Codex CLI fix: Codex refuses a model as not supported for the account

Codex CLI says the model is not supported

The response is a 400 carrying an invalid_request_error. The model exists, your login does not cover it, and the CLI passed the name through without checking it against anything.

is not supported when using Codex with a ChatGPT account
Printed by Codex CLI.

Diagnosis

What it actually is

Model availability is a property of the login

Which models an account can use depends on how it authenticated. A ChatGPT sign-in and an API key reach different lists, and so do different plan tiers, which is why a model a colleague picks without trouble is refused on your machine.

The CLI does not pre-filter what you ask for

A model named on the command line or in config.toml is sent as written. Nothing local compares it against the list your account can see, so the first thing to know the name is wrong is the backend, and it answers 400.

The real list is answered live, per credential

The app-server has a model/list call and it answers for the login in use. Termdeck asks that rather than shipping a hardcoded catalog, because a static list is exactly what hides a new model from a picker while every other layer is already correct.

Check

Confirm it before you fix it

Run thisWhat a good answer looks like
codex login statusNames the auth mode. ChatGPT and API key reach different lists, so this decides which set of models the next question is even about.
grep -n model ~/.codex/config.tomlFinds a pinned model you may have forgotten. A model set here applies to every session and long outlives the one you were running when it broke.

Every command here has been run on a real machine. Termdeck answers the same questions for every machine you have connected, without opening a terminal on any of them.

Fix

Cheapest thing first

1. Run once without a model override

Let the CLI use the default your login carries. If that works, the name you pinned is the problem rather than the account.

2. Unpin the model in config.toml

A stale model line survives every update, and it is the usual reason this appears out of nowhere weeks after somebody set it.

3. Switch the login rather than the model

Where the model is one an API key covers and a ChatGPT sign-in does not, signing in the other way is shorter than hunting for an equivalent.

Not this

What will not help

Updating the CLI

The refusal came from the backend, and a newer CLI sends the same name to the same account. An update helps only when the model is so new that your CLI cannot name it at all, which fails differently.

FAQ

Codex refuses a model as not supported for the account, answered

Does this mean the model does not exist?

No. It means your login does not cover it. The same name can work on another account on the same machine.

Why did it work yesterday?

A plan change, a switched login, or a model moving out of preview all change the list without anything on your machine changing.

Where does the model name come from if I did not pass one?

Codex reads a default from its config, so a model line set once applies to every session afterwards.