-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
Summary
I am unable to use the vector_stores
endpoints in the latest OpenAI Python SDK (openai
v1.93.2), even though the official documentation and the SDK's own source code show these features should be available.
Environment
- openai package version: 1.93.2
- Python version: 3.13
- OS: macOS
- Virtual environment: Yes (
.venv
) - How installed:
pip install openai --upgrade
What I Did
I am following the official documentation for using the Assistants v2 API with file search, which requires creating a vector store and associating it with an assistant.
The documented code looks like this:
vector_store = client.beta.vector_stores.create(name="my_store")
vector_store_file = client.beta.vector_stores.files.create_and_poll(
vector_store_id=vector_store.id,
file_id=file.id,
)
assistant = client.beta.assistants.update(
assistant_id=assistant.id,
tools=[{"type": "file_search"}],
tool_resources={
"file_search": {
"vector_store_ids": [vector_store.id]
}
}
)
What Actually Happens
- The
client.beta.vector_stores
attribute does not exist in my environment. - Attempting to access it results in:
AttributeError: 'Beta' object has no attribute 'vector_stores'
- However, the
vector_stores
directory and code are present in the installed SDK package.
Debug Output
from openai import OpenAI
client = OpenAI(api_key="sk-...")
print(hasattr(client.beta, "vector_stores")) # Outputs: False
- Listing the SDK package contents shows
vector_stores
is present:.venv/lib/python3.13/site-packages/openai/resources/vector_stores/
What I Expect
client.beta.vector_stores
should be available and work as documented.- The SDK and documentation should match, or there should be a clear indication if this is a gated/beta/feature-flagged API.
Additional Notes
- I have tried reinstalling the SDK and recreating my virtual environment.
- This issue persists across different Python versions and environments.
- The official documentation and markdown examples all use
client.beta.vector_stores
.
Questions
- Is there a feature flag or special access required to use
vector_stores
in the Python SDK? - Is this a rollout issue, or is the documentation ahead of the SDK release?
- Is there a recommended workaround until this is resolved?
Thank you for your help!
(Feel free to request any additional logs or environment details.)
To Reproduce
To Reproduce
Steps to reproduce the behavior:
- Install the latest OpenAI Python SDK (
pip install --upgrade openai
). - Set your OpenAI API key in your environment (e.g.,
export OPENAI_API_KEY=sk-...
). - Start a Python interpreter or run the following script:
from openai import OpenAI
client = OpenAI(api_key="sk-...")
print(hasattr(client.beta, "vector_stores")) # Expected: True; Actual: False
- Observe that
client.beta.vector_stores
does not exist, even though the documentation and SDK package contents suggest it should.
Code snippets
OS
macOS
Python version
3.13
Library version
1.93.2
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation