Add vector stores support to beta namespace #2353
Open
+34
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Vector Stores Support to client.beta Namespace
Description
This PR restores the ability to access vector store resources through the client.beta namespace in the Python SDK, matching the API documentation. Previously, although vector_stores could be imported via client.vector_stores, attempting to reach it under client.beta.vector_stores resulted in an AttributeError.
Problem
The OpenAI API docs describe creating and managing vector stores via the beta namespace, for example:
vector_store = client.beta.vector_stores.create(name="My Vector Store")
However, in SDK v1.78.0:
This discrepancy broke user workflows—especially around the Assistants API’s file_search tool, which relies on vector stores for semantic retrieval.
Changes Made
Testing
Verified that after this change:
Why This Fix Is Needed
Aligns the SDK’s implementation with its own documentation and user expectations. Full beta–namespace support for vector stores is critical for enabling semantic file search workflows in the Assistants API.
Related Issue
Resolves #2347