Codex Rust: now way to provide api version for azure provider
Resolved 💬 5 comments Opened Jun 12, 2025 by da1z Closed Sep 24, 2025
What version of Codex is running?
codex-cli 0.0.2505291458
Which model were you using?
o3
What platform is your computer?
Darwin 24.5.0 arm64 arm
What steps can reproduce the bug?
model = "gpt-4o"
model_provider = "azure"
[model_providers.azure]
name = "Azure"
base_url = "https://resource.openai.azure.com/openai/v1"
wire_api = "chat"
env_key = "OPENAI_API_KEY"
will fail with: API in preview mode, please use api-version=preview.
need to provide api-version in queryParams
What is the expected behavior?
works?
What do you see instead?
API in preview mode, please use api-version=preview.
Additional information
_No response_
5 Comments
workaround for now is to put full url and #
base_url = "https://<myresource>.azure.com/openai/responses?api-version=2025-04-01-preview#"can be fixed by https://github.com/openai/codex/pull/1319
@da1z
I'm having the same issue, and your workaround worked great for me!
Hope there will be a permanent fix soon.
Thank you!
Works for me, and resolves the need to specify API Versions
don't pick from
/modelsthough else it gives⚠️ stream error: unexpected status 404 Not Found: {"error":{"code":"DeploymentNotFound"...}}errors.looks like it was fixed in some recent releases