Skip to content

refactor: make provider_id mandatory in vector DB registration to avoid ambiguity #3147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HabebNawatha
Copy link

What does this PR do?

This PR improves vector database registration by making provider_id a mandatory field, aligning with best practices across the codebase and ensuring consistent, explicit behavior.

Previously, if multiple vector_io providers were registered and no provider_id was provided, the system would arbitrarily pick the first provider or raise a less-clear error. This change eliminates ambiguity and ensures users always specify which provider to use.

Closes #2834

Test Plan

  • Modified the register_vector_db method signature to require provider_id explicitly.
  • Verified that API now returns a validation error when provider_id is missing.
  • Confirmed behavior with multiple and single provider setups to ensure proper enforcement.
Screenshot 2025-08-14 at 17 07 42 Screenshot 2025-08-14 at 17 08 35

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 14, 2025
@HabebNawatha HabebNawatha changed the title Make provider_id Mandatory in Vector DB Registration to Avoid Ambiguity refactor: make provider_id mandatory in vector DB registration to avoid ambiguity Aug 14, 2025
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.

Revisit whether "provider_id" should be mandatory during resource registration for vector DB
1 participant