Open
Description
Describe the bug
Summary
I'm trying to use the new vector store support in OpenAI's Assistants API (file_search with vector_store_ids), but the Python SDK (v1.78.0) does not expose the vector_stores
attribute under client.beta
.
What I expected
According to the documentation, I should be able to:
vector_store = client.beta.vector_stores.create(name="My Vector Store")
And use it with:
tools=[{"type": "file_search"}],
tool_resources={"file_search": {"vector_store_ids": [vector_store.id]}}
What happened
However, the following fails:
"vector_stores" in dir(client.beta) # returns False
client.beta.vector_stores # AttributeError
>>> print(dir(client.beta))
['__annotations__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_client', '_delete', '_get', '_get_api_list', '_patch', '_post', '_put', '_sleep', 'assistants', 'chat', 'realtime', 'threads', 'with_raw_response', 'with_streaming_response']
No vector_store
The SDK version is:
Name: openai
Version: 1.78.0
I've tried installing from main, clearing cache, and reinstalling — the attribute is still missing.
Expected outcome
It would be great to:
expose vector_stores under client.beta
provide example usage (as shown in API reference)
clarify whether SDK support is delayed or upcoming
To Reproduce
- Install the latest SDK (1.78.0) or try development versions:
pip install --no-cache-dir openai==1.78.0
pip install --no-cache-dir git+https://github.com/openai/openai-python.git@a790e6e
pip install --no-cache-dir git+https://github.com/openai/openai-python.git@6c6e17679a6f90dd15e58b13d85e0b2e8bb5f209
pip install --no-cache-dir https://github.com/openai/openai-python/archive/refs/heads/main.zip
- Initialize the client:
from openai import OpenAI
client = OpenAI(api_key="sk-...") # My valid API key
- Try to access vector stores:
print("vector_stores" in dir(client.beta)) # Expected: True, Got: False
print(client.beta.vector_stores) # Raises: AttributeError
OS
macOS
Python version
Python v3.11
Library version
openai v1.78.0