Azure custom provider: model refresh logs "missing field `models`" on every exec, and features.remote_models=false does not suppress it
Open 💬 1 comment Opened May 11, 2026 by voytas75
Version
codex-cli 0.130.0
Config
Using an Azure custom provider in ~/.codex/config.toml:
model = "gpt-5.4"
model_provider = "azure"
[model_providers.azure]
name = "Azure"
base_url = "https://<redacted>.openai.azure.com/openai"
env_key = "AZURE_OPENAI_API_KEY"
wire_api = "responses"
query_params = { "api-version" = "2025-04-01-preview" }
Repro
SCRATCH=$(mktemp -d)
cd "$SCRATCH"
git init -q
printf 'test\n' > README.md
codex exec --sandbox read-only -p gpt-54-medium --ephemeral "Reply with exactly: SMOKE_OK" --skip-git-repo-check
Also reproducible with:
codex --config features.remote_models=false exec --sandbox read-only -p gpt-54-medium --ephemeral "Reply with exactly: SMOKE_OK" --skip-git-repo-check
Actual behavior
Every run logs this error before the command completes successfully:
ERROR codex_models_manager::manager: failed to refresh available models: stream disconnected before completion: failed to decode models response: missing field `models`; body: {
"data": [
...
],
"object": "list"
}
The run itself succeeds and returns the expected result:
SMOKE_OK
Expected behavior
One of these should happen:
- Azure model refresh should accept the OpenAI-style
/modelsresponse shape:
``json``
{ "data": [...], "object": "list" }
- If remote model fetching is unsupported for this Azure path, Codex should skip this refresh cleanly instead of logging an error every run.
features.remote_models=falseshould suppress this refresh path if that is the intended control.
Notes
This looks related to Azure / remote model fetching behavior in #9536.
The confusing part as a user is:
codex execworks- but model refresh logs a hard error every run
- and
features.remote_models=falsedoes not prevent it
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗