openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

vector_stores.list() returns empty list even if vector stores exist

Open alexander-grun opened this issue 9 months ago • 4 comments

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • [x] This is an issue with the Python library

Describe the bug

ls = client.vector_stores.list() print(ls)

gives

SyncCursorPage[VectorStore](data=[], has_more=False, object='list', first_id=None, last_id=None)

but querying by ID gives results back.

vs = client.vector_stores.retrieve( vector_store_id="vs_123" ) print(vs)

To Reproduce

ls = client.vector_stores.list() print(ls)

Code snippets


OS

Windows

Python version

3.12

Library version

1.66.3

alexander-grun avatar Mar 17 '25 16:03 alexander-grun

Update: it works now, but after few hours, so there is a significant delay in List action on vector store API, which makes it a bit confusing if you create a new vector store and query the list after that.

alexander-grun avatar Mar 17 '25 20:03 alexander-grun

a "fetch when needed" type of retrieval logic might help so that it doesn't cause delays while running.

debarghyaRONIN avatar May 16 '25 13:05 debarghyaRONIN

Thanks for reporting!

This sounds like an issue with the underlying OpenAI API and not the SDK, so I'm going to go ahead and close this issue.

Would you mind reposting at community.openai.com?

RobertCraigie avatar Jun 05 '25 16:06 RobertCraigie