codex-rs 0.2.0 still not working with Azure
Resolved 💬 12 comments Opened Jul 4, 2025 by seb-lec Closed Jul 8, 2025
💡 Likely answer: A maintainer (bolinfest, collaborator)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.2.0
Which model were you using?
gpt-4o
What platform is your computer?
Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
Hello,
It's supposed to be fixed in 0.2.0 but it still doesn't work and give 404 errors.
Here's the config:
model = "gpt-4o"
model_provider = "azure"
[model_providers.azure]
name = "Azure"
base_url = "https://xxx.openai.azure.com/openai"
env_key = "AZURE_OPENAI_API_KEY"
query_params = { api-version = "2024-12-01-preview" }
wire_api = "chat"
Please note that the same config as json works with the nodjs version of the cli:
{
"model": "gpt-4o",
"provider": "azure",
"providers": {
"azure": {
"name": "AzureOpenAI",
"baseURL": "https://xxx.openai.azure.com/openai",
"envKey": "AZURE_OPENAI_API_KEY"
}
}
}
What is the expected behavior?
Working
What do you see instead?
BackgroundEvent(BackgroundEventEvent { message: stream error: unexpected status 404 Not Found: ...
12 Comments
need a better document to guidance with Azure OpenAI API
Same behaviour here
I have Azure working with the following config.toml in ~./.codex:
This works here:
I found that the codex deployment has to be called codex-mini-latest so that codex-rs can match the right model context size.
And you can also use entra auth, though the token won't be refreshed:
Thanks for sharing the
codex-mini-latestbit.the same issue here, will this be fixed in next release?
Thanks a lot to everyone.
Indeed I could make it work with o4-mini with this config:
I think the bug can be kept open to either fix the tool or the config.md for better explanation if that's by design.
I also was able to make it work. Thanks everyone.
Double check that you are using the native version published in Github. The one published in NPM,
0.1.2505291658/nativedoesn't include the fix.If you want to perform a quick test, just run this
Dockerfile, and ensure thatbase_urlis the one that includes _deployments_ on it:If you run:
@bolinfest Can we publish the new
nativeversion in npm registry, please?@fcsonline I just updated the npm publishing scripts in https://github.com/openai/codex/pull/1472 so we can update the npm module. Should be done by end of day.
@fcsonline (and others): if you (re-)install via
npm, you should now have v0.2.0, which is the Rust version. I updated the installation instructions as part of https://github.com/openai/codex/pull/1475.OMG! @bolinfest you rock!