Hello,
It appears there’s a serious bug with the vector stores. I’ve observed this bug only recently.
I tried adding a file to a vector store. Right after having done that, I list the files using client.vector_stores.files.list(vector_store_id=vector_store_id)
. Everything went fine:
(py3) $ python debug/test_vector_store.py
2025-06-18 07:01:57,145 - INFO - HTTP Request: POST https://api.openai.com/v1/files "HTTP/1.1 200 OK"
2025-06-18 07:01:57,904 - INFO - HTTP Request: POST https://api.openai.com/v1/vector_stores/vs_67fe08f4557081919a0b827b9e0fd8fb/files "HTTP/1.1 200 OK"
2025-06-18 07:01:58,134 - INFO - HTTP Request: GET https://api.openai.com/v1/vector_stores/vs_67fe08f4557081919a0b827b9e0fd8fb/files/file-E9dBTXUkqd4YwnwB4SsyX8 "HTTP/1.1 200 OK"
2025-06-18 07:01:59,368 - INFO - HTTP Request: GET https://api.openai.com/v1/vector_stores/vs_67fe08f4557081919a0b827b9e0fd8fb/files/file-E9dBTXUkqd4YwnwB4SsyX8 "HTTP/1.1 200 OK"
2025-06-18 07:01:59,371 - INFO - Added files to vector store vs_67fe08f4557081919a0b827b9e0fd8fb: [VectorStoreFile(id='file-E9dBTXUkqd4YwnwB4SsyX8', created_at=1750222917, last_error=None, object='vector_store.file', status='completed', usage_bytes=3021, vector_store_id='vs_67fe08f4557081919a0b827b9e0fd8fb', attributes={}, chunking_strategy=StaticFileChunkingStrategyObject(static=StaticFileChunkingStrategy(chunk_overlap_tokens=400, max_chunk_size_tokens=800), type='static'), _request_id='req_d5b9ac56036c9c6ec800d35afdae2e5e')]
2025-06-18 07:01:59,610 - INFO - HTTP Request: GET https://api.openai.com/v1/vector_stores/vs_67fe08f4557081919a0b827b9e0fd8fb/files "HTTP/1.1 200 OK"
2025-06-18 07:01:59,613 - INFO - Files in vector store vs_67fe08f4557081919a0b827b9e0fd8fb: [VectorStoreFile(id='file-E9dBTXUkqd4YwnwB4SsyX8', created_at=1750222917, last_error=None, object='vector_store.file', status='completed', usage_bytes=3021, vector_store_id='vs_67fe08f4557081919a0b827b9e0fd8fb', attributes={}, chunking_strategy=StaticFileChunkingStrategyObject(static=StaticFileChunkingStrategy(chunk_overlap_tokens=400, max_chunk_size_tokens=800), type='static'))]
2025-06-18 07:02:00,042 - INFO - HTTP Request: GET https://api.openai.com/v1/files/file-E9dBTXUkqd4YwnwB4SsyX8 "HTTP/1.1 200 OK"
2025-06-18 07:02:00,044 - INFO - ['GetVocal_news.pdf (file-E9dBTXUkqd4YwnwB4SsyX8)']
The PDF file has been added successfully, as you can see from the logs.
Then, a minute later, I tried listing the files again using the same function:
(py3) $ python debug/test_vector_store.py
2025-06-18 07:02:31,957 - INFO - HTTP Request: GET https://api.openai.com/v1/vector_stores/vs_67fe08f4557081919a0b827b9e0fd8fb/files "HTTP/1.1 200 OK"
2025-06-18 07:02:31,959 - INFO - Files in vector store vs_67fe08f4557081919a0b827b9e0fd8fb: []
2025-06-18 07:02:31,960 - INFO - []
The file is not there anymore! In production we have a routine that uploads files to vector stores and it should skip files that exist already in the store. This bug has caused it to constantly uploads hundreds of files again and again.
Any idea to solve this please?
Thank you very much in advance for your help!