stream error: unexpected status 400 Bad Request:

Resolved 💬 6 comments Opened Sep 11, 2025 by stretchcloud Closed Nov 9, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.34.0

Which model were you using?

gpt-5

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

Upgrade the CLI to the latest one.
Set the ~/.codex/config.toml to authenticate using Azure OpenAI instance
Run codex

What is the expected behavior?

_No response_

What do you see instead?

<img width="638" height="906" alt="Image" src="https://github.com/user-attachments/assets/65cf80a9-d5fa-4ebc-a41d-93e4d6881f60" />

Additional information

_No response_

View original on GitHub ↗

6 Comments

nikhil-pandey · 11 months ago

+1 Hitting this issue after updating to the latest version

stretchcloud · 11 months ago

Seems like a knows issue. https://github.com/openai/codex/issues/3451

Downgrade the CLI to 0.31.0. Worked for me.

bro4all · 11 months ago

can any one post their config.toml for the azure end point? somehow .31 is not working for me either and .29 was working and now it is not

DevOps-zhuang · 11 months ago

I met similar issue, it is ' stream error: unexpected status 400 Bad Request: {"error":{"code":"BadRequest","message":"API version not supported"}};', I even downgrade to 0.31.0, it still doesn't work for me ;(

Dion-van-Huyssteen · 11 months ago

Getting this issue using our LiteLLM endpoint (which is going to azure for gpt-5 calls). Roll back to 0.31.0 does work for me.

etraut-openai contributor · 9 months ago

I think this has been fixed. If you're seeing a similar error with the most recent version of codex, please open a new issue.