Skip to content

Conversation

@franciscojavierarceo
Copy link
Collaborator

@franciscojavierarceo franciscojavierarceo commented Aug 26, 2025

What does this PR do?

This change migrates the VectorDB id generation to Vector Stores.

This is a breaking change for some users that may have application code using the vector_db_id parameter in the request of the VectorDB protocol instead of the VectorDB.identifier in the response.

By default we will now create a Vector Store every time we register a VectorDB. The caveat with this approach is that this maps the vector_db_idvector_store.name. This is a reasonable tradeoff to transition users towards OpenAI Vector Stores.

As an added benefit, registering VectorDBs will result in them appearing in the VectorStores admin UI.

Why?

This PR makes the POST API call to /v1/vector-dbs swap the vector_db_id parameter in the request body into the VectorStore's name field and sets the vector_db_id to the generated vector store id (e.g., vs_038247dd-4bbb-4dbb-a6be-d5ecfd46cfdb).

That means that users would have to do something like follows in their application code:

res = client.vector_dbs.register(
    vector_db_id='my-vector-db-id', 
    embedding_model='ollama/all-minilm:l6-v2', 
    embedding_dimension=384,
)
vector_db_id = res.identifier

And then the rest of their code would behave, including VectorIO's insert protocol using vector_db_id in the request.

An alternative implementation would be to just delete the vector_db_id parameter in VectorDB but the end result would still require users having to write vector_db_id = res.identifier since VectorStores.create() generates the ID for you.

So this approach felt the easiest way to migrate users towards VectorStores (subsequent PRs will be added to trigger files.create() and vector_stores.files.create()).

Test Plan

Unit tests and integration tests have been added.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 26, 2025
@franciscojavierarceo franciscojavierarceo changed the title BREAKING CHANGE: Migrate Vector DBs to vector store ID !feat: Migrate Vector DBs to vector store ID (breaking change) Aug 26, 2025
@franciscojavierarceo franciscojavierarceo changed the title !feat: Migrate Vector DBs to vector store ID (breaking change) feat!: Migrate Vector DBs to vector store ID (breaking change) Aug 26, 2025
@franciscojavierarceo franciscojavierarceo changed the title feat!: Migrate Vector DBs to vector store ID (breaking change) feat!: Migrate Vector DB IDs to Vector Store IDs (breaking change) Aug 26, 2025
Copy link
Contributor

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

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

/lgtm
The changes look good. However, in longer term it would be good to rip Vector DB and support only vector stores directly. To be able to use vector dbs now, we are breaking the ability to pass vector_db_id to subsequent calls in vector_io which was possible before and this can be confusing.

Copy link
Contributor

@2000krysztof 2000krysztof left a comment

Choose a reason for hiding this comment

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

/lgtm

@franciscojavierarceo
Copy link
Collaborator Author

/lgtm The changes look good. However, in longer term it would be good to rip Vector DB and support only vector stores directly. To be able to use vector dbs now, we are breaking the ability to pass vector_db_id to subsequent calls in vector_io which was possible before and this can be confusing.

So this PR makes the POST API call to /v1/vector-dbs swap the vector_db_id parameter in the request body into the VectorStore's name field and sets the vector_db_id to the generated vector store id (e.g., vs_038247dd-4bbb-4dbb-a6be-d5ecfd46cfdb).

That means that users would have to do something like follows in their application code:

res = client.vector_dbs.register(
    vector_db_id='my-vector-db-id', 
    embedding_model='ollama/all-minilm:l6-v2', 
    embedding_dimension=384,
)
vector_db_id = res.identifier

And then the rest of their code would behave, including VectorIO's insert protocol using vector_db_id in the request.

An alternative implementation would be to just delete the vector_db_id parameter in VectorDB but the end result would still require users having to write vector_db_id = res.identifier since VectorStores.create() generates the ID for you.


vector_store_id = vector_store.id
actual_provider_vector_db_id = provider_vector_db_id or vector_store_id
logger.warning(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this is a reasonable way to highlight this to users.

@franciscojavierarceo
Copy link
Collaborator Author

@leseb mind taking a look at this one?


provider = self.impls_by_provider_id[provider_id]
logger.warning(
"VectorDB is being deprecated in future releases in favor of VectorStore. Please migrate your usage accordingly."
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand, if it's deprecated (or want to deprecate soon), why convert the call to vector store under the hood? Can't we just fail the call and tell users to use VectorStore?

Copy link
Collaborator Author

@franciscojavierarceo franciscojavierarceo Aug 29, 2025

Choose a reason for hiding this comment

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

I wanted to provide a lower friction migration.

The path would be:

  1. Create Vector Stores (this PR)
  2. Create Files and Vector Store Files for user (would be next PR)

Doing this would make the migration easier for users IMO. Under the hood, Vector Stores uses most of the VectorDB and VectorIO logic.

Given we have so many Red Hat users of RAG, I thought this was an easier path for them.

For some, they may just rip off the bandaid and that'd definitely be preferred but I'm happy to try and reduce the friction as much as possible.

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.

I'm wondering if we should park this for 0.3.0 since it's a breaking change? @mattf @ashwinb thoughts? Thanks!

@franciscojavierarceo
Copy link
Collaborator Author

I'm good with that. I'm happy to also include the other items I mentioned in this PR then too if @mattf and @ashwinb are comfortable with this.

To be clear, I am in favor of deprecating the APIs and I am only doing this because (1) I know many Red Hat+ use cases rely on VectorIO and VectorDB APIs and (2) even though the Stack is still early in its adoption lifecycle, I want to treat users with care as we deprecate APIs and I believe this work will provide that.

Copy link
Contributor

@r3v5 r3v5 left a comment

Choose a reason for hiding this comment

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

Great work, @franciscojavierarceo ! lgtm

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.

This hasn’t received much attention, and I’d like to move it forward. We’re on the right track, and precautions have been taken to minimize any impact on end users. Thank you!

@leseb leseb merged commit e2fe39a into llamastack:main Sep 5, 2025
21 checks passed
jgarciao added a commit to jgarciao/opendatahub-tests that referenced this pull request Sep 30, 2025
This is needed after this breaking change in llama-stack:
llamastack/llama-stack#3253

Signed-off-by: Jorge Garcia Oncins <[email protected]>
jgarciao added a commit to opendatahub-io/opendatahub-tests that referenced this pull request Oct 1, 2025
* fix: Obtain vector_db_id when registering the vectordb

This is needed after this breaking change in llama-stack:
llamastack/llama-stack#3253

Signed-off-by: Jorge Garcia Oncins <[email protected]>

* fix: Add back uuid to vector_db identifier

Signed-off-by: Jorge Garcia Oncins <[email protected]>

* feat: set llama-stack-storage-size to 2Gi

Signed-off-by: Jorge Garcia Oncins <[email protected]>

---------

Signed-off-by: Jorge Garcia Oncins <[email protected]>
rhods-ci-bot pushed a commit to opendatahub-io/opendatahub-tests that referenced this pull request Oct 1, 2025
* fix: Obtain vector_db_id when registering the vectordb

This is needed after this breaking change in llama-stack:
llamastack/llama-stack#3253

Signed-off-by: Jorge Garcia Oncins <[email protected]>

* fix: Add back uuid to vector_db identifier

Signed-off-by: Jorge Garcia Oncins <[email protected]>

* feat: set llama-stack-storage-size to 2Gi

Signed-off-by: Jorge Garcia Oncins <[email protected]>

---------

Signed-off-by: Jorge Garcia Oncins <[email protected]>
jgarciao added a commit to opendatahub-io/opendatahub-tests that referenced this pull request Oct 1, 2025
* fix: Obtain vector_db_id when registering the vectordb

This is needed after this breaking change in llama-stack:
llamastack/llama-stack#3253



* fix: Add back uuid to vector_db identifier



* feat: set llama-stack-storage-size to 2Gi



---------

Signed-off-by: Jorge Garcia Oncins <[email protected]>
Co-authored-by: Jorge <[email protected]>
sheltoncyril pushed a commit to sheltoncyril/opendatahub-tests that referenced this pull request Oct 2, 2025
…o#662)

* fix: Obtain vector_db_id when registering the vectordb

This is needed after this breaking change in llama-stack:
llamastack/llama-stack#3253

Signed-off-by: Jorge Garcia Oncins <[email protected]>

* fix: Add back uuid to vector_db identifier

Signed-off-by: Jorge Garcia Oncins <[email protected]>

* feat: set llama-stack-storage-size to 2Gi

Signed-off-by: Jorge Garcia Oncins <[email protected]>

---------

Signed-off-by: Jorge Garcia Oncins <[email protected]>
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.

5 participants