Codex cli 0.99 uses the default model instead of the one specified in the config.toml

Open 💬 7 comments Opened Feb 12, 2026 by sameetn
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.99

What subscription do you have?

None

Which model were you using?

gpt-5-mini in Azure Open AI

What platform is your computer?

Linux

What terminal emulator and version are you using (if applicable)?

_No response_

What issue are you seeing?

Looks like the codex cli is defaulting to gpt-5 model instead of the specified gpt-5-mini in the config.toml below

sandbox_mode = "workspace-write"
approval_policy = "on-failure"
 
model = "gpt-5-mini"  # Replace with your actual model deployment name
model_provider = "azure"
model_reasoning_effort = "medium"
 
[model_providers.azure]
name = "Azure OpenAI"
base_url = "http://<custom Azure URL>"
env_key = "OPENAI_API_KEY"
wire_api = "responses"

■ unexpected status 401 Unauthorized: key not allowed to access model. This key
can only access models=['gpt-5-mini']. Tried to access gpt-5, url: https://<custom Azure URL>/responses

What steps can reproduce the bug?

npm i -g !openai/codex@0.99

setup config.toml to use anything other than OPenAI and start codex and ask it a question,

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

7 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #11561
  • #11189
  • #11187
  • #10953

Powered by Codex Action

picanismajoris · 5 months ago

Please fix, I verified on cyber link, it came back to codex 5.3 for a day then today again back to 5.2

kendonB · 5 months ago

Behaviour I'm seeing is the toml default is 5.3 codex xhigh and 5.3 codex high is what is there as the first default

etraut-openai contributor · 5 months ago

If you're using an Azure endpoint, gpt-5.3-codex is not yet available. We're working with our partners to enable it.

@sameetn, it looks like your issue doesn't involve gpt-5.3-codex. Please use the /feedback slash command to upload your logs and post the thread ID here. That will help me diagnose the issue. You mentioned that you're seeing the problem with 0.99. Does that mean that if you downgrade to 0.98, the problem goes away? I'm trying to determine if this was a client-side regression.

etraut-openai contributor · 5 months ago

I'm going to close this because we don't have enough information to diagnose. @sameetn, if you can provide answers to the above questions, I can take a closer look.

sameetn · 5 months ago

Yes…when I download to 0.98 the problem went away. So definitely something with the upgrade.

etraut-openai contributor · 5 months ago

OK, thanks for the info. Reopening.