Forum Discussion
Azure OpenAI Assistants error to upload file in vector store
Hi everyone,
I work on python and i'm using OpenAI Assistants to do file search
This morning i found a new error in the Azure service for vector stores when i try to upload files.
The file is a simply text file. Until this morning everything works correctly.
Using this method:
file_batch = client.beta.vector_stores.file_batches.upload_and_poll(
vector_store_id=vector_store.id,
files=[file_stream]
)
I obtain this results:
VectorStoreFileBatch(id='vsfb_54481954a81c4304a50836a045c46b3e', created_at=1722517040, file_counts=FileCounts(cancelled=0, completed=0, failed=1, in_progress=0, total=1), object='vector_store.file_batch', status='failed', vector_store_id='vs_toxChpcsKo4zP5hJ1rolC9ND')
Looking the file i can see the error:
client.beta.vector_stores.files.list(vector_store.id).data
[VectorStoreFile(id='assistant-ZkqNET3MpPlCMofluUe5QADJ', created_at=1722517035, last_error=LastError(code='server_error', message='An internal error occurred.')]
I repeated the flow but everytime i ge the same problem.
I tested the same thing with OpenAI and it worked.
Is this happening to anyone else?
Thanks,
Matteo
2 Replies
- yuerCopper Contributor
You're not alone – this is likely an Azure backend ingestion failure, not a bug in your code.
Here’s what I’d recommend checking:
The file format: even a tiny encoding glitch can cause ingestion failure. Try re-saving as UTF-8 plain text.
Region-specific endpoint: check if your Azure deployment has a regional outage or update push.
File size: Azure ingestion sometimes fails silently if above certain thresholds. Retry with smaller chunks.
Rate limit / hidden backoff: even if not shown, some background processes enforce retry timers. Add a delay between uploads.
Upload method compatibility: the beta .upload_and_poll method might’ve been silently patched. Try .upload() then .poll() manually.
If you run:
client.beta.vector_stores.files.list(vector_store.id)
...and it consistently returns LastError(code='server_error'), it strongly suggests internal service error.
Bonus tip: If needed, I can help write a retry-safe wrapper with backoff handling.
Let me know if this persists — it might be worth contacting Azure support directly with the VectorStore ID for log trace.
Any luck by trying below:
- Rename the file: Try a simple lowercase name like datafile.txt.
- Retry with delay: Wait a few minutes between attempts.
- Check Azure status: Visit Azure Status to see if there are any known outages or issues.