unable to run codex cli with azure openai deployment

Resolved 💬 4 comments Opened Sep 16, 2025 by Fatcat-tech Closed Nov 24, 2025

What version of Codex is running?

codex-cli 0.36.0

Which model were you using?

gpt-5

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

Unable to make codex cli work with azure open ai deployment. PFA my config.toml # Set the default model and provider model = "gpt-5" model_provider = "azure" preferred_auth_method = "apikey" # Configure the Azure provider [model_providers.azure] name = "Azure" # Make sure you set the appropriate subdomain for this URL. #https://rubrixai-1142-resource.cognitiveservices.azure.com/openai/deployments/gpt-5/chat/completions base_url = "https://rubrixai-1142-resource.cognitiveservices.azure.com/openai/v1/" env_key = "AZURE_OPENAI_API_KEY" query_params = { api-version = "2025-01-01-preview" } wire_api = "responses" model_reasoning_effort = "high" # Example of configuring an MCP server for Playwright ⚠️ stream error: unexpected status 400 Bad Request: {"error":{"code":"BadRequest","message":"API version not supported"}}; retrying 1/5 in 208ms… ⚠️ stream error: unexpected status 400 Bad Request: {"error":{"code":"BadRequest","message":"API version not supported"}}; retrying 2/5 in 417ms… ⚠️ stream error: unexpected status 400 Bad Request: {"error":{"code":"BadRequest","message":"API version not supported"}}; retrying 3/5 in 728ms… ⚠️ stream error: unexpected status 400 Bad Request: {"error":{"code":"BadRequest","message":"API version not supported"}}; retrying 4/5 in 1.713s… ⚠️ stream error: unexpected status 400 Bad Request: {"error":{"code":"BadRequest","message":"API version not supported"}}; retrying 5/5 in 3.511s… ■ unexpected status 400 Bad Request: {"error":{"code":"BadRequest","message":"API version not supported"}}

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗