feat(vector_store)!: replace ChromaDB with Milvus Lite - #154
Merged
Merged
Conversation
jakub-walaszczyk
requested review from
Mateusz-Switala,
MichalSteczko and
filip-komarzyniec
September 11, 2026 12:19
Remove the ChromaDB backend entirely (its `chromadb` dependency carried a
large vulnerability surface) and adopt Milvus Lite as the local, zero-server
vector store. Milvus Lite is the embedded mode of the existing Milvus backend,
so it reuses `MilvusVectorStore` and supports hybrid (dense + BM25) search
that Chroma never had.
- Split the Milvus config in two, both served by `MilvusVectorStore`:
- `MilvusConfig` (provider "milvus") is now remote-server-only and
validates that `uri` is an `http(s)://` URL, so a mistyped `MILVUS_URI`
fails loudly instead of silently spinning up a throwaway local database
in production.
- `MilvusLiteConfig` (provider "milvus_lite") is the explicit embedded
engine, configured by a local `db_path` (env `MILVUS_LITE_DB_PATH`). A
shared `_is_server_url` guard keeps the two validations from drifting
apart, and a blank/whitespace `db_path` is rejected up front instead of
surfacing as an opaque pymilvus error.
- Add `temporary_milvus_lite_store`, a throwaway-store context manager (temp
dir + auto cleanup via `TemporaryDirectory`, logging rather than raising on
a `close()` failure) now backing model pre-selection and judge calibration,
which previously relied on ephemeral in-memory Chroma.
- Remove all Chroma vector-only special-casing: hybrid search and the full
hybrid search space now apply to every backend; `vector_store_type` is
validated against "milvus", "milvus_lite", and "pgvector" via a single
`SUPPORTED_PROVIDERS` list shared between the vector store config and the
default search space.
- Drop the now-unused `vector_store_type` parameter from `AI4RAGSearchSpace`,
`prepare_search_space_with_maas`, and
`get_default_ai4rag_search_space_parameters` - it never varied the
generated search space, only validated against `SUPPORTED_PROVIDERS`,
which every remaining backend now supports identically.
- Swap the dependency `chromadb` -> `pymilvus[milvus-lite]` and delete the
now-obsolete `ensure_sqlite3` ChromaDB compatibility shim.
- Align `VectorStoreSettings` fields (`provider_type`/`collection_name`) with
the payload the event handler actually emits.
- Update tests (real embedded Milvus Lite in the unit tier, plus integration
and functional concurrent-query tests) and all documentation accordingly.
BREAKING CHANGE: `ChromaConfig`, `ChromaVectorStore`, and the "chroma" vector
store provider are removed, along with the `chromadb` dependency.
`MilvusConfig` no longer accepts a local file path as its `uri` (it must be
an `http(s)://` server URL); use `MilvusLiteConfig(db_path=...)` for an
embedded local database. The `vector_store_type` argument is also removed
from `AI4RAGSearchSpace.__init__`, `prepare_search_space_with_maas`, and
`get_default_ai4rag_search_space_parameters`.
Signed-off-by: Jakub Walaszczyk <jwalaszc@redhat.com>
Assisted-by: Claude Code
jakub-walaszczyk
force-pushed
the
feat/replace-chromadb-with-milvus-lite
branch
from
September 11, 2026 14:18
0a49fef to
b7406b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the ChromaDB backend entirely (its
chromadbdependency carried a large vulnerability surface) and adopt Milvus Lite as the local, zero-server vector store. Milvus Lite is the embedded mode of the existing Milvus backend, so it reusesMilvusVectorStoreand supports hybrid (dense + BM25) search that Chroma never had.MilvusVectorStore:MilvusConfig(provider "milvus") is now remote-server-only and validates thaturiis anhttp(s)://URL, so a mistypedMILVUS_URIfails loudly instead of silently spinning up a throwaway local database in production.MilvusLiteConfig(provider "milvus_lite") is the explicit embedded engine, configured by a localdb_path(envMILVUS_LITE_DB_PATH).temporary_milvus_lite_store, a throwaway-store context manager (temp dir + auto cleanup) now backing model pre-selection and judge calibration, which previously relied on ephemeral in-memory Chroma.vector_store_typeis validated against "milvus", "milvus_lite", and "pgvector".chromadb->pymilvus[milvus-lite]and delete the now-obsoleteensure_sqlite3ChromaDB compatibility shim.BREAKING CHANGE:
ChromaConfig,ChromaVectorStore, and the "chroma" vector store provider are removed, along with thechromadbdependency.MilvusConfigno longer accepts a local file path as itsuri(it must be anhttp(s)://server URL); useMilvusLiteConfig(db_path=...)for an embedded local database.Assisted-by: Claude Code
Relates to: #153
Resolves:
Description
Brief summary of changes
Motivation
Why is this change needed?
Changes
Testing
How did you test this?
Checklist