Hello Rob,
**
Why your run fails immediately**
The runtime is telling you only that something in the service pipeline blew up (code:"server_error"
). From previous incidents the same symptom is produced by one (or a combination) of the following:
Likely cause | How to confirm | Fix / work-around |
---|---|---|
Empty thread – you start a run before a user message exists, so the scheduler aborts with 0 prompt tokens (exactly what you see in the object you pasted). | Check that usage.prompt_tokens is 0 and your thread has no thread.message resources. | Add at least one user message first or use the one-shot threads/runs endpoint and pass the message in the additional_messages array. |
Empty thread – you start a run before a user message exists, so the scheduler aborts with 0 prompt tokens (exactly what you see in the object you pasted). | Check that usage.prompt_tokens is 0 and your thread has no thread.message resources. |
Add at least one user message first or use the one-shot threads/runs endpoint and pass the message in the additional_messages array. |
Missing preview header – every Assistants request still needs OpenAI-Beta: assistants=v2 . Forgetting it silently routes to an older backend that throws a 500. |
Inspect the request you send over the wire. | Add the header (see docs & sample calls) ([learn.microsoft.com](https://learn.microsoft.com/en-us/answers/questions/2168565/wheres-the-rest-api-docs-for-the-new-azure-ai-agen?utm_source=chatgpt.com"Where's the REST API docs for the new Azure AI Agents?")) |
Wrong / older API version – Assistants are recognised only from 2024-02-15-preview onward. |
Look at the api-version= query you pass. |
Use the current preview (2024-06-01-preview or later) ([learn.microsoft.com](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/assistant?utm_source=chatgpt.com"Getting started with Azure OpenAI Assistants (Preview)")) |
Model build that doesn’t yet support Assistants – early GPT-4o builds in some regions crash the run scheduler. | Try the same call with a GPT-4-turbo or GPT-3.5-turbo deployment. If it succeeds, the issue is model-specific. | Redeploy GPT-4o with the latest version, or keep using GPT-4-turbo until the backend fix is rolled out ([learn.microsoft.com](https://learn.microsoft.com/en-us/answers/questions/1685523/azure-openai-gpt-4o-issues-in-assistant-api-throw?utm_source=chatgpt.com"Azure OpenAI gpt-4o issues in assistant api, throw an error that this ..."), [learn.microsoft.com](https://learn.microsoft.com/en-us/answers/questions/2287438/azure-openai-assistants-thread-run-failed-generati?utm_source=chatgpt.com"Azure OpenAI Assistants - thread.run.failed generating image with ...")) |
Regional incident / backend bug | Send the call again and capture the x-ms-client-request-id header that comes back. |
Open a support ticket and provide: request-id, run-id, region, model. PG can pull the exact failure trace. |
Quick sanity check
curl -X POST \
"$AZURE_OPENAI_ENDPOINT/openai/threads/runs?api-version=2024-06-01-preview" \
-H "Content-Type: application/json" \
-H "api-key: $AZURE_OPENAI_KEY" \
-H "OpenAI-Beta: assistants=v2" \
-d '{
"assistant_id": "asst_...your_id...",
"additional_messages":[
{ "role":"user", "content":"Say hello in one sentence." }
]
}'
If the run now moves to queued
or in_progress
, the pipeline is healthy and the root cause was an empty thread or missing header.
If it still fails
Capture the full response headers (they include request-id
and x-ms-region
).
Switch to a different deployment (e.g., GPT-4-turbo) or region to see whether the error is model / region–specific.
Raise a support ticket with the details above so the product team can look at the backend logs.
That should get your assistant talking again. Let me know how it goes!
Best Regards,
Jerald Felix