Forum Discussion

YashPatel2798's avatar
YashPatel2798
Copper Contributor
Aug 26, 2025

Azure OpenAI: gpt-5-mini chat/completions streaming returns empty response.

Summary

When calling gpt-5-mini via Chat Completions with "stream": true, the server opens the stream but no assistant tokens are emitted and the final JSON is empty (choices: [], created: 0, empty id/model).
The same code path streams correctly for gpt-5 and gpt-4o deployments.
Also, non-streaming ("stream": false) with gpt-5-mini returns valid content as expected.

Environment

  • API: POST /openai/deployments/{deployment}/chat/completions?api-version=2025-01-01-preview

  • Model / Deployment: gpt-5-mini (Azure OpenAI deployment)

  • Date/Time observed: 26 Aug 2025, ~13:00 IST (UTC+05:30)

  • Region: useast2

  • Note: Same client, headers, and network path work for gpt-5 and gpt-4o streaming.

Request

Endpoint

/openai/deployments/gpt-5/chat/completions?api-version=2025-01-01-preview

Body

{ "messages": [ { "role": "system", "content": "give the best result you can" }, { "role": "user", "content": "Hello" } ], "stream": true }

Actual Response (final aggregated JSON after stream ends)

{ "choices": [], "created": 0, "id": "", "model": "", "object": "", "prompt_filter_results": [ { "prompt_index": 0, "content_filter_results": { "hate": { "filtered": false, "severity": "safe" }, "jailbreak": { "filtered": false, "detected": false }, "self_harm": { "filtered": false, "severity": "safe" }, "sexual": { "filtered": false, "severity": "safe" }, "violence": { "filtered": false, "severity": "safe" } } } ] }

Notes:

  • No delta tokens arrive on the SSE stream.
  • No assistant message content is ever emitted.
  • Content filter result is safe across categories.

Expected Behavior

With "stream": true, server should emit SSE chunks with assistant delta tokens and finish with a populated final message in choices[0].message.content.

Azure OpenAI: gpt-5-mini chat/completions streaming returns empty response (choices: [], created: 0) while other models stream fine

1 Reply

  • Allen's avatar
    Allen
    Icon for Community Manager rankCommunity Manager

    Hi Sorry, the community lounge is for questions about the Microsoft Tech Community.

    Moving your post to Azure AI Foundry Community.

Resources