Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llama_stack/apis/vector_dbs/vector_dbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ async def register_vector_db(
self,
vector_db_id: str,
embedding_model: str,
provider_id: str,
embedding_dimension: int | None = 384,
provider_id: str | None = None,
vector_db_name: str | None = None,
provider_vector_db_id: str | None = None,
) -> VectorDB:
Expand Down
11 changes: 1 addition & 10 deletions llama_stack/core/routing_tables/vector_dbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,12 @@ async def register_vector_db(
self,
vector_db_id: str,
embedding_model: str,
provider_id: str,
embedding_dimension: int | None = 384,
provider_id: str | None = None,
provider_vector_db_id: str | None = None,
vector_db_name: str | None = None,
) -> VectorDB:
provider_vector_db_id = provider_vector_db_id or vector_db_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is provider_vector_db_id and why does it take precedence here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback provider_vector_db_id = provider_vector_db_id or vector_db_id is no longer needed
since the merged logic now uses provider_vector_db_id or vector_store_id downstream. Updated.

if provider_id is None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typically i role out a log first to note that the change is breaking but i suppose it's too late for that in this change.

if len(self.impls_by_provider_id) > 0:
provider_id = list(self.impls_by_provider_id.keys())[0]
if len(self.impls_by_provider_id) > 1:
logger.warning(
f"No provider specified and multiple providers available. Arbitrarily selected the first provider {provider_id}."
)
else:
raise ValueError("No provider available. Please configure a vector_io provider.")
model = await lookup_model(self, embedding_model)
if model is None:
raise ModelNotFoundError(embedding_model)
Expand Down
Loading