Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests for validating the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
Introduce new feature of incorporating GCS storage provider, similar to what is already available with AWS S3 storage provider
Added
New storage class for GCS storage provider, with the relevant methods of uploading, getting, deleting and deleting all files
Tests for GCS storage provider
Changed
[List any changes, updates, refactorings, or optimizations]
Deprecated
[List any deprecated functionality or features that have been removed]
Removed
[List any removed features, files, or functionalities]
Fixed
[List any fixes, corrections, or bug fixes]
Security
[List any new or updated security-related changes, including vulnerability fixes]
Breaking Changes
BREAKING CHANGE: [List any breaking changes affecting compatibility or functionality]
Additional Information
[Insert any additional context, notes, or explanations for the changes]
[Reference any related issues, commits, or other relevant information]
Documentation to come in another separate PR
Screenshots or Videos
[Attach any relevant screenshots or videos demonstrating the changes]
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/8637
**Author:** [@kahghi](https://github.com/kahghi)
**Created:** 1/17/2025
**Status:** ✅ Merged
**Merged:** 1/22/2025
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `add-gcs-storage-provider`
---
### 📝 Commits (10+)
- [`42b7beb`](https://github.com/open-webui/open-webui/commit/42b7beb8a7d1e0b914ff2f6edfd514b4189541b5) add GCSStorageProvider
- [`8efc543`](https://github.com/open-webui/open-webui/commit/8efc543f49b4fbaef175d7319770cdc47b61a2f2) added google-cloud-storage package, added gcs related functions
- [`1764de4`](https://github.com/open-webui/open-webui/commit/1764de41f3c5164c5f81b4d9373b344798fa814a) updated to use credentials json, tested with local built image and upload to gcs works
- [`49f31dd`](https://github.com/open-webui/open-webui/commit/49f31ddcd8ee3801a3b0f83f39614995c00c4d74) added alternative storage client instantiation method, corrected filepaths, added missing type hinting
- [`44574c4`](https://github.com/open-webui/open-webui/commit/44574c434d379e58605b9b83b58d975cc959da7c) removed unnecessary GCS_PROJECT_ID variable
- [`4b56c15`](https://github.com/open-webui/open-webui/commit/4b56c15a3f86d08cb8fefdf3c66c50de50095f7e) test_upload_file working, added gcp-storage-emulator, updated gcs client instantiation
- [`55cc127`](https://github.com/open-webui/open-webui/commit/55cc127b03898b164c535ac1063358f973b4fec3) gcs tests pass, updated get_file and delete_file to retrieve blob instead of instantiating blob
- [`b1887fe`](https://github.com/open-webui/open-webui/commit/b1887fef1b2b53ed36ee36140c136d4ed62233fc) added suggestions
- [`4aa9b8d`](https://github.com/open-webui/open-webui/commit/4aa9b8d5e720128fbf948990431915d942ff2476) removed unused pytest-env and imports
- [`a93124c`](https://github.com/open-webui/open-webui/commit/a93124cafb43f42efb50990314c4301191a253c0) tidied up test fixture for gcp storage emulator
### 📊 Changes
**6 files changed** (+1983 additions, -1160 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/config.py` (+3 -0)
📝 `backend/open_webui/storage/provider.py` (+67 -1)
📝 `backend/open_webui/test/apps/webui/storage/test_provider.py` (+95 -1)
📝 `backend/requirements.txt` (+1 -0)
📝 `pyproject.toml` (+3 -2)
📝 `uv.lock` (+1814 -1156)
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Have you written and run sufficient tests for validating the changes?
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
- Introduce new feature of incorporating GCS storage provider, similar to what is already available with AWS S3 storage provider
### Added
- New storage class for GCS storage provider, with the relevant methods of uploading, getting, deleting and deleting all files
- Tests for GCS storage provider
### Changed
- [List any changes, updates, refactorings, or optimizations]
### Deprecated
- [List any deprecated functionality or features that have been removed]
### Removed
- [List any removed features, files, or functionalities]
### Fixed
- [List any fixes, corrections, or bug fixes]
### Security
- [List any new or updated security-related changes, including vulnerability fixes]
### Breaking Changes
- **BREAKING CHANGE**: [List any breaking changes affecting compatibility or functionality]
---
### Additional Information
- [Insert any additional context, notes, or explanations for the changes]
- [Reference any related issues, commits, or other relevant information]
- Documentation to come in another separate PR
### Screenshots or Videos
- [Attach any relevant screenshots or videos demonstrating the changes]
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/8637
Author: @kahghi
Created: 1/17/2025
Status: ✅ Merged
Merged: 1/22/2025
Merged by: @tjbck
Base:
dev← Head:add-gcs-storage-provider📝 Commits (10+)
42b7bebadd GCSStorageProvider8efc543added google-cloud-storage package, added gcs related functions1764de4updated to use credentials json, tested with local built image and upload to gcs works49f31ddadded alternative storage client instantiation method, corrected filepaths, added missing type hinting44574c4removed unnecessary GCS_PROJECT_ID variable4b56c15test_upload_file working, added gcp-storage-emulator, updated gcs client instantiation55cc127gcs tests pass, updated get_file and delete_file to retrieve blob instead of instantiating blobb1887feadded suggestions4aa9b8dremoved unused pytest-env and importsa93124ctidied up test fixture for gcp storage emulator📊 Changes
6 files changed (+1983 additions, -1160 deletions)
View changed files
📝
backend/open_webui/config.py(+3 -0)📝
backend/open_webui/storage/provider.py(+67 -1)📝
backend/open_webui/test/apps/webui/storage/test_provider.py(+95 -1)📝
backend/requirements.txt(+1 -0)📝
pyproject.toml(+3 -2)📝
uv.lock(+1814 -1156)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.