## codex models
Codex asks the ChatGPT backend which models it offers each signed-in account: `GET https://chatgpt.com/backend-api/codex/models?client_version=…`. The backend shows a model only to clients at or past its minimal client version, so albedo sends the latest released Codex CLI version, read from npm (`@openai/codex`), rechecked whenever a stale list is refreshed; a forced reload always rechecks it, so a released client version unlocks its models the moment you reload. A model OpenAI releases to Codex appears in `/model` without an albedo update, and no model name is hardcoded. The list is cached per account in `$ALBEDO_HOME/codex-models.json`: `/model` refreshes it when it is over an hour old, conditionally with the backend's ETag, and a Codex session start refreshes it in the background. Lookups read only the cache.
A Codex lookup answers for the ChatGPT endpoint with the backend's own facts: the default window (`context_window`), the maximum a raised cap gives (`max_context_window`, when larger), input kinds, and reasoning efforts, including levels models.dev does not list. models.dev's `openai` entry fills in what the backend leaves out, such as the output limit. A model the backend does not report falls back to that `openai` entry. `/effort`, session defaults, and model switches use this same selection.
A Codex lookup answers for the ChatGPT endpoint with the backend's own facts: the default window (`context_window`), the maximum a raised cap gives (`max_context_window`, when larger), input kinds, and reasoning efforts, including levels models.dev does not list. Codex advertises `ultra` as a virtual tier that cannot be requested; the catalog excludes it from new responses and existing cached lists. models.dev's `openai` entry fills in what the backend leaves out, such as the output limit. A model the backend does not report falls back to that `openai` entry. `/effort`, session defaults, and model switches use this same selection.
## choosing a model from the command line
`albedo models` prints `provider/model` for every configured provider, the active provider first and each provider's default model first. `albedo -p <prompt> --model <model>` takes either spelling the agents' `spawn(model=...)` takes: `provider/model`, or a bare id, served by the active provider when it offers it and otherwise by the one provider that does. Only exact ids match; an id no provider lists, or one several list, is refused before a session is created. A new session starts on the model; with `--session`, `POST /sessions/:id/model` (`{model, provider}`, capability `session_model`) switches that session without making the model the default for new sessions, which `/model` does.