Azure-Hosted Codex Issue: Stream disconnected before completion (invalid type: null, expected struct Error)

Data Catalyst 1 Reputation point
2025-11-17T09:00:37.8133333+00:00

See: https://github.com/openai/codex/issues/6710

What version of Codex is running?

codex-cli 0.58.0 and 0.59.0-alpha.5

What subscription do you have?

azureopenai

Which model were you using?

gpt-5-codex, gpt-5 - rolling back to o3 fixes it. Switching to Open AI direct fixes it.

Where can we post a bug for this - it seems an Azure issue, or an Azure/OpenAI integration issue, not a pure OpenAI problem.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
{count} votes

1 answer

Sort by: Most helpful
  1. Manas Mohanty 13,340 Reputation points Moderator
    2025-11-21T11:07:38.49+00:00

    Hi Data Catalyst

    Could you please create an azure AI foundry project and use CLI 0.63 and let us know if the issue still persists at your side.

    Increase TPM to 300K TPM and higher to timeout issues.

    Please test GPT-5-mini/GPT-5.1-codex/GPT-5.1-codex-mini as alternate.

    Attached screenshot for proof of work (Trial Region East US 2) on 25th Nov 2025.

    User's image

    Note: O3 is not supported for Codex models in Azure OpenAI

    https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/codex?view=foundry-classic&tabs=npm#deploy-a-model-in-foundry

    Please let us know the above pointers fixes the issue.

    Thank you.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.