Skip to content

Commit b1d3451

Browse files
authored
fix(vector-io): replace inline::milvus with inline::sqlite-vec as default (#301)
[RHAIENG-3916](https://redhat.atlassian.net/browse/RHAIENG-3916) # What does this PR do? Milvus-lite acquires an exclusive file lock on startup, which prevents any second process from opening the database. This causes the LlamaStack pod to crash when configured with multiple workers. This PR replaces `inline::milvus` with `inline::sqlite-vec` as the always-enabled default vector_io provider. The `remote::milvus` provider is unaffected. ## Test Plan Manual verification only. Automated multi-worker vector_io testing is not included in this PR because `inline::sqlite-vec` currently opens SQLite without WAL mode or a busy timeout, which makes a 2-worker test unreliable under concurrent writes. [5344](ogx-ai/ogx#5344 (comment)) has been filed to address [`_create_sqlite_connection`](https://github.com/llamastack/llama-stack/blob/f7a10a4748a19979214f5a9d642945cc9b2ce36f/src/llama_stack/providers/inline/vector_io/sqlite_vec/sqlite_vec.py#L109); a smoke test covering multi-worker vector_io will be added once that fix lands. - [X] Build the container image and verify `sqlite-vec` installs cleanly - [X] Start the server and confirm vector_io operations work correctly with a single worker - [X] Verify `remote::milvus` activates when `MILVUS_ENDPOINT` is set ## Summary by CodeRabbit * **Changes** * Switched the default vector database backend from Milvus to SQLite-Vec. * Updated container dependencies and vector storage configuration to support the new backend. * **Documentation** * Updated provider documentation to reflect the new default vector database. Approved-by: rhdedgar Approved-by: cdoern
2 parents f1adce7 + f59b851 commit b1d3451

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

distribution/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ RUN uv pip install \
2020
'mcp>=1.23.0' \
2121
'nltk>=3.9.4' \
2222
'pymilvus==2.6.9' \
23-
'pymilvus[milvus-lite]==2.6.9' \
2423
'pypdf>=6.7.2' \
2524
aiosqlite \
2625
asyncpg \
@@ -49,6 +48,7 @@ RUN uv pip install \
4948
scipy \
5049
sentencepiece \
5150
sqlalchemy[asyncio] \
51+
sqlite-vec \
5252
tokenizers \
5353
tqdm \
5454
transformers \

distribution/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You can see an overview of the APIs and Providers the image ships with in the ta
3838
| tool_runtime | remote::model-context-protocol | No || N/A |
3939
| tool_runtime | remote::tavily-search | No || N/A |
4040
| vector_io | inline::faiss | No || Set the `ENABLE_FAISS` environment variable |
41-
| vector_io | inline::milvus | No || N/A |
41+
| vector_io | inline::sqlite-vec | No || N/A |
4242
| vector_io | remote::milvus | No || Set the `MILVUS_ENDPOINT` environment variable |
4343
| vector_io | remote::pgvector | No || Set the `ENABLE_PGVECTOR` environment variable |
4444
| vector_io | remote::qdrant | No || Set the `ENABLE_QDRANT` environment variable |

distribution/config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ providers:
5858
api_key: ${env.OPENAI_API_KEY:=}
5959
base_url: ${env.OPENAI_BASE_URL:=https://api.openai.com/v1}
6060
vector_io:
61-
- provider_id: milvus
62-
provider_type: inline::milvus
61+
- provider_id: sqlite-vec
62+
provider_type: inline::sqlite-vec
6363
config:
64-
db_path: /opt/app-root/src/.llama/distributions/rh/milvus.db
64+
db_path: /opt/app-root/src/.llama/distributions/rh/sqlite_vec.db
6565
persistence:
6666
backend: kv_default
67-
namespace: vector_io::milvus
67+
namespace: vector_io::sqlite_vec
6868
- provider_id: ${env.ENABLE_FAISS:+faiss}
6969
provider_type: inline::faiss
7070
config:

0 commit comments

Comments
 (0)