Resource not found with Azure endpoints

Resolved 💬 6 comments Opened Jul 19, 2025 by ordogfioka Closed Sep 1, 2025

What version of Codex is running?

codex-cli 0.8.0

Which model were you using?

o4-mini

What platform is your computer?

Linux 6.8.0-76060800daily20240311-generic x86_64 x86_64

What steps can reproduce the bug?

install from npm

~/.codex/config.toml

# top-level settings
model_reasoning_effort = "high"
model_reasoning_summary = "none"

model_provider = "azure"
model = "o4-mini"

[model_providers.azure]
name = "Azure OpenAI"
base_url = "https://XXX.openai.azure.com/"
env_key = "AZURE_OPENAI_API_KEY"
wire_api     = "responses"                   
query_params = { api-version = "2025-04-01-preview" }

[profiles.o4-mini]
model_provider = "azure"
model          = "o4-mini"

run codex from command line

What is the expected behavior?

It should work

What do you see instead?

<img width="800" alt="Image" src="https://github.com/user-attachments/assets/ef0ebc15-15e2-4e65-b0bd-35963b98f4d9" />

Additional information

_No response_

View original on GitHub ↗

6 Comments

nikalaew · 1 year ago

@ordogfioka try add /openai for the base url at the end.

codex v 1.102.2
martrdev · 1 year ago
ckr0 · 1 year ago

here is my config:

model = "codex-mini"
model_provider = "azure"
approval_policy = "untrusted"

[model_providers.azure]
name = "Azure"
base_url = "https://xxxxxxxxxxxx.cognitiveservices.azure.com/openai"
env_key = "AZURE_OPENAI_API_KEY"
wire_api = "responses"
query_params = { api-version = "2025-04-01-preview" }

why am i getting:

BackgroundEvent(BackgroundEventEvent { message: "stream error: unexpected status 404 Not Found: {\"error\":{\"code\":\"404\",\"message\": \"Resource not found\"}}; retrying 1/10 in 200ms…" })
nikalaew · 1 year ago

@ckr0 Try to downgrade to 0.10, there's an issue with 0.11.0: https://github.com/openai/codex/issues/1796

dustookk · 1 year ago

Bug still exists in 0.12.0, everything was good with 0.10.0

doggy8088 · 12 months ago