Skip to content

fix(vectordb): VectorDBInput has no provider_id#2830

Merged
leseb merged 1 commit intollamastack:mainfrom
Elbehery:20250721_fix_vectordb_provider_id
Jul 21, 2025
Merged

fix(vectordb): VectorDBInput has no provider_id#2830
leseb merged 1 commit intollamastack:mainfrom
Elbehery:20250721_fix_vectordb_provider_id

Conversation

@Elbehery
Copy link
Contributor

@Elbehery Elbehery commented Jul 21, 2025

What does this PR do?

This PR add provider_id field to VectorDBInput class.

fixes #2819

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 21, 2025
@Elbehery
Copy link
Contributor Author

cc @leseb @ehhuang

Copy link
Collaborator

@leseb leseb left a comment

Choose a reason for hiding this comment

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

Tested the change locally and confirmed it works, however I have a small concern provider_id being optional here.

vector_db_id: str
embedding_model: str
embedding_dimension: int
provider_id: str | None = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't provider_id be mandatory? Otherwise, how do we determine to which provider we should be routing to?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh I see, we have:

        if provider_id is None:
            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}."
                    )

Which seems really arbitrary, but anyways this is a discussion for another time I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you kindly raise an issue with the future work ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i see u raised #2834

i have signed up for it 👍🏽

Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
@Elbehery Elbehery force-pushed the 20250721_fix_vectordb_provider_id branch from a9c799f to 1c9b744 Compare July 21, 2025 10:59
@Elbehery
Copy link
Contributor Author

failure is fixed in #2815

@leseb leseb merged commit b2c7543 into llamastack:main Jul 21, 2025
76 of 77 checks passed
@Elbehery Elbehery deleted the 20250721_fix_vectordb_provider_id branch July 21, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vector_dbs entry causes "AttributeError: 'VectorDBInput' object has no attribute 'provider_id'" exception

2 participants