mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[PR #17776] [CLOSED] feat: Implement Milvus multi-tenancy mode #24545
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/17776
Author: @Classic298
Created: 9/26/2025
Status: ❌ Closed
Base:
dev← Head:feat/milvus-multitenancy-1📝 Commits (3)
e0ec1d0feat: Implement Milvus multi-tenancy mode4fdfd35Merge branch 'dev' into feat/milvus-multitenancy-1e677c9bfeat: Implement Milvus multi-tenancy mode📊 Changes
22 files changed (+482 additions, -349 deletions)
View changed files
📝
backend/open_webui/config.py(+4 -9)📝
backend/open_webui/retrieval/vector/dbs/milvus.py(+4 -12)➕
backend/open_webui/retrieval/vector/dbs/milvus_multitenancy.py(+281 -0)📝
backend/open_webui/retrieval/vector/factory.py(+14 -3)📝
backend/open_webui/routers/configs.py(+29 -30)📝
backend/open_webui/routers/notes.py(+0 -12)📝
backend/open_webui/routers/users.py(+0 -1)📝
backend/open_webui/utils/middleware.py(+1 -99)📝
backend/open_webui/utils/oauth.py(+5 -17)📝
src/lib/apis/files/index.ts(+1 -1)📝
src/lib/components/admin/Settings/Evaluations/Model.svelte(+1 -1)📝
src/lib/components/admin/Users/Groups/Permissions.svelte(+1 -9)📝
src/lib/components/chat/MessageInput.svelte(+12 -12)📝
src/lib/components/chat/MessageInput/IntegrationsMenu.svelte(+21 -3)📝
src/lib/components/chat/ModelSelector.svelte(+1 -1)📝
src/lib/components/chat/ModelSelector/Selector.svelte(+13 -15)➖
src/lib/components/icons/Knobs.svelte(+0 -24)📝
src/lib/components/workspace/Models.svelte(+10 -12)📝
src/lib/i18n/locales/de-DE/translation.json(+41 -41)📝
src/lib/i18n/locales/pt-BR/translation.json(+23 -23)...and 2 more files
📄 Description
This commit introduces a scalable, multi-tenant architecture for Milvus, mirroring the existing Qdrant implementation. When enabled via the
ENABLE_MILVUS_MULTITENANCY_MODEenvironment variable, this mode utilizes a fixed set of shared collections instead of creating a new collection for each resource.Data isolation is achieved by adding a
resource_idto each vector's metadata and applying a filter expression (expr) to all database operations. This prevents the proliferation of collections, which can lead to performance degradation and resource exhaustion in large-scale deployments.The implementation includes:
milvus_multitenancy.pymodule with the multi-tenant client.config.pyto enable the mode and define the collection prefix.factory.pyto conditionally select the appropriate Milvus client.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.Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.