Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
vector_stores.files.upload_and_poll() can hang indefinitely.
Observed failure mode:
- file upload succeeds
- attaching the file to a vector store succeeds
upload_and_poll() never returns
- polling
vector_stores.files.retrieve() shows the file stuck at status="in_progress" forever
last_error stays null
The raw uploaded file is already status="processed", so the hang appears to be in vector store file processing/indexing, not raw file upload.
Environment
openai==2.31.0
- Python 3.12
- observed on April 15-16, 2026
MRE
from openai import OpenAI
client = OpenAI()
vs = client.vector_stores.create(name="probe")
result = client.vector_stores.files.upload_and_poll(
vector_store_id=vs.id,
file=("probe.md", b"hello world"),
)
print(result)
In the failing case above, upload_and_poll() hangs indefinitely.
Equivalent explicit polling repro:
from openai import OpenAI
import time
client = OpenAI()
vs = client.vector_stores.create(name="probe")
raw = client.files.create(file=("probe.md", b"hello world"), purpose="assistants")
client.vector_stores.files.create(vector_store_id=vs.id, file_id=raw.id)
for i in range(20):
vf = client.vector_stores.files.retrieve(vector_store_id=vs.id, file_id=raw.id)
rf = client.files.retrieve(raw.id)
print(i, "vector_store_file:", vf.status, vf.last_error, "raw_file:", rf.status)
time.sleep(2)
Observed
vector_store_file.status == "in_progress" indefinitely
vector_store_file.last_error is None
raw_file.status == "processed"
Expected
Either:
- the vector store file reaches
completed, or
- it reaches
failed with a real error
It should not stay in_progress forever, and upload_and_poll() should not wait forever.
To Reproduce
The following hangs indefinitely:
from openai import OpenAI
client = OpenAI()
vs = client.vector_stores.create(name="probe")
result = client.vector_stores.files.upload_and_poll(
vector_store_id=vs.id,
file=("probe.md", b"hello world"),
)
print(result)
Code snippets
OS
macOS
Python version
v3.12
Library version
v2.31.0
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
vector_stores.files.upload_and_poll()can hang indefinitely.Observed failure mode:
upload_and_poll()never returnsvector_stores.files.retrieve()shows the file stuck atstatus="in_progress"foreverlast_errorstaysnullThe raw uploaded file is already
status="processed", so the hang appears to be in vector store file processing/indexing, not raw file upload.Environment
openai==2.31.0MRE
In the failing case above,
upload_and_poll()hangs indefinitely.Equivalent explicit polling repro:
Observed
vector_store_file.status == "in_progress"indefinitelyvector_store_file.last_error is Noneraw_file.status == "processed"Expected
Either:
completed, orfailedwith a real errorIt should not stay
in_progressforever, andupload_and_poll()should not wait forever.To Reproduce
The following hangs indefinitely:
Code snippets
OS
macOS
Python version
v3.12
Library version
v2.31.0