Blue to purple gradient with the title Change the Codex model: /model, -m, config and a tilted screenshot of the VibeiDE terminal grid
All articles

How to change the model in Codex CLI: /model, -m, config

Change the model in Codex CLI as of October 2026: /model in a session, codex -m for one run, config.toml defaults, profiles and reasoning effort.

Codex lets you pick which OpenAI model runs your task, and the choice matters more than it looks: it changes how deep the agent reasons, how fast it answers and how much of your plan allowance a task uses. The model list also moves quickly. On October 14, 2026 OpenAI retired GPT-5.5 from Codex with ChatGPT sign-in, so saved configs and scripts that name it need an update.

VibeiDEAll your agents. One Grid.Battery friendly, no 3D. 14 days free, no card.Download

Quick answer: type /model inside a Codex session, start a run with codex --model <id> (or -m), or set model = "<id>" in ~/.codex/config.toml to change the default for every run.

This guide covers the current Codex models, how to switch between them in the CLI, where Codex reads the model setting from, how reasoning effort works, and a short checklist for moving off a retired model. Everything below was checked against the official Codex models page in October 2026. Model names and plan access change, so treat that page as the source of truth.

Can you use GPT-6.2 Astra and Sol in Codex?

Yes, if your plan includes them. OpenAI released GPT-6.2 Astra and GPT-6.2 Sol on November 17, 2026 in ChatGPT Work, Codex and the API, and its GPT-6.2 release notes say to pick them with the model picker in the Codex app or /model in the CLI. As of 17 November 2026, those notes list Plus, Pro, Business, Enterprise and Edu for Work, say Codex and Work share usage, and say Enterprise and Edu admins must first enable the models in workspace settings. The notes suggest Astra for work such as tracing a bug across services, and Sol for reviewing a pull request or revising code after feedback.

ModelAPI IDHow OpenAI's model page describes it
GPT-6.2 Astragpt-6.2-astra"Our most capable model for your hardest projects, from start to finish."
GPT-6.2 Solgpt-6.2-sol"Our go-to model for everyday work, from coding to powering agents at scale."

One caution: when we checked on 17 November 2026, the Codex models page still listed the four earlier IDs shown in the next section and no 6.2 IDs. The IDs in this table come from OpenAI's API model pages, and we have not confirmed them as values for codex -m or config.toml. Choose from the list that /model shows in your own CLI, and update the Codex CLI if the 6.2 models are missing. For what is new in these two models, see GPT-6.2 Astra and Sol: what changed and how to use them in Codex.

Which Codex models are available

As of late October 2026, the models page lists four recommended models for Codex when you sign in with ChatGPT:

ModelIDWhat OpenAI recommends it for
Astragpt-6-astraThe hardest end-to-end work that needs sustained reasoning and judgment
GPT-6.1 Solgpt-6.1-solComplex coding and repeated, long-running work when cost matters
GPT-6.1 Terragpt-6.1-terraFast, efficient work on clear writing, visual understanding and computer use
GPT-6 Lunagpt-6-lunaFocused, high-volume tasks such as extraction, transformation and focused coding

OpenAI's short version: use GPT-6.1 Sol for complex coding and agentic work when it is available to your account and client, Luna for clear, repeatable tasks, and Astra when a task needs the strongest capability across steps and tools. GPT-6.1 Sol is described as near-Astra performance at a lower cost than Astra. GPT-6.1 Terra is the newest entry on the list: OpenAI describes it as a fast, efficient choice for writing, interpreting images and screens, and computer use, and its model card lists the Codex CLI among its surfaces. For most coding work, Sol or Luna remain the usual picks.

Availability depends on your plan, sign-in method and client. As of October 2026, the GPT-6.1 Sol rollout covers Plus, Pro, Business, Enterprise and Edu in the desktop app and CLI, Enterprise and Edu keep it off until an administrator enables it, and Free and Go are not included at launch. The older GPT-5.6 Sol, Terra and Luna models remain available during that rollout. Check the pricing page for plan access and credit usage.

If you do not set a model at all, the Codex CLI, IDE extension and desktop app use a recommended model for you. For many people that default is fine. You set a model when you want something cheaper for routine work, something stronger for a hard task, or the same model on every machine and in CI. For a weekly tracking of Claude and GPT models side by side, see the VibeiDE model benchmark. For the same settings in Claude Code, see our guide to Claude Code models.

Switch models in the Codex CLI

There are three ways to choose a model, from most temporary to most permanent.

Inside a session. Type /model in an interactive Codex session. It lets you switch the model or adjust reasoning effort for the current chat. Choose More reasoning… to see the Max or Ultra options a model supports.

For one run. Pass --model or its short alias -m when you start Codex. It works the same for interactive and non-interactive runs:

codex --model gpt-6.1-sol
codex exec -m gpt-6.1-sol "Review the current changes"

If you script Codex, the second form is the one to remember. Our codex exec guide covers the rest of the non-interactive flags.

As your default. Add a model line to ~/.codex/config.toml. The CLI, IDE extension and desktop app share this file:

model = "gpt-6.1-sol"
model_reasoning_effort = "medium"

You can also override any config key for a single run with -c or --config. The value is parsed as TOML, so strings need inner quotes:

codex --config model='"gpt-6.1-sol"'

Prefer the dedicated --model flag when it exists; --config is for keys without their own flag.

Where Codex reads the model from

When the same key is set in several places, Codex uses the highest layer that sets it. As of October 2026 the order, highest first, is:

  1. CLI flags and --config overrides
  2. Project .codex/config.toml files, closest to your working directory wins (trusted projects only)
  3. A profile file selected with --profile NAME, stored as ~/.codex/NAME.config.toml
  4. Your user config, ~/.codex/config.toml
  5. Cloud-managed defaults, a system config such as /etc/codex/config.toml, then built-in defaults
Five stacked layers that decide the Codex model, highest first: the --model or --config flag, project .codex/config.toml, a --profile file, ~/.codex/config.toml, then the built-in recommended default.
Codex reads the model from the highest layer that sets it: CLI flags, trusted project config, a profile file, your user config, then the built-in default.

Two practical consequences. First, a project can pin its own model in .codex/config.toml, which is useful when a repository needs a stronger model than your personal default. Codex only loads project config for projects you trust. Second, if a model change "does nothing", look for a higher layer that still sets the old value, often a project file or a flag in a shell alias.

Profiles for different kinds of work

Profiles are separate files next to config.toml. Since Codex 0.134.0, --profile reads ~/.codex/NAME.config.toml and no longer reads [profiles.NAME] tables inside config.toml, so older setups need to be moved. A profile only needs the keys that differ from your base config:

# ~/.codex/deep-review.config.toml
model = "gpt-6.1-sol"
model_reasoning_effort = "medium"
approval_policy = "on-request"
codex --profile deep-review
codex exec --profile deep-review "review this change"

A common split is a fast profile with Luna for chores such as renames, extraction and test scaffolding, and a deep profile with Sol or Astra for design changes and debugging.

Pick a reasoning effort

The model is only half of the setting. model_reasoning_effort decides how long the model thinks before it acts. The config reference lists values such as low, medium, high, xhigh, max and ultra; which ones you get depends on the model and the client.

A slider for model_reasoning_effort moving from low through medium, high and xhigh to max and ultra; max gives one task more time and is the top level for GPT-6 Luna, ultra splits work across subagents.
Reasoning effort trades speed and usage for depth. Max spends more time on one task; Ultra splits the task across subagents. Available levels depend on the model and client.
  • low (shown as Light in the app and IDE) suits quick, well-scoped tasks.
  • medium balances speed and depth for tasks that need some planning.
  • high and xhigh suit difficult work with several steps, sources or tradeoffs.
  • max gives the model more time on a single task. OpenAI suggests it for the hardest problems, when depth matters more than speed or usage.
  • ultra goes beyond a single agent and uses subagents to work on separate parts of a task in parallel. GPT-6 Luna supports efforts up to Max but not Ultra.

OpenAI's starting points: the default effort for GPT-6.1 Sol, High for Luna and Light for Astra. Efforts do not map exactly between model generations, so rerun a familiar task at a lower setting before assuming you need more. Most tasks need neither Max nor Ultra, and higher effort uses more of your allowance. Our guide to Codex usage limits shows how much each model allows per five-hour window, and if you hit limits often, see Codex rate limits.

Two related keys are worth knowing. plan_mode_reasoning_effort sets a separate effort for plan mode, and review_model sets the model that /review uses, which otherwise defaults to the session model. If agent replies feel too long, model_verbosity = "low" asks for shorter responses on providers that use the Responses API.

Move off a retired model

OpenAI retires older Codex models on fixed dates. As of October 2026 the models page lists:

ModelStatus in Codex with ChatGPT sign-in
gpt-5.5Retired October 14, 2026
gpt-5.3-codex-sparkRetired September 14, 2026
gpt-5.4, gpt-5.4-miniRetired August 31, 2026
gpt-5.2, gpt-5.3-codexDeprecated

For GPT-5.5, the suggested replacement is GPT-6.1 Sol (gpt-6.1-sol) on Plus, Pro, Business, Enterprise and Edu, and GPT-6 Luna (gpt-6-luna) in the desktop app on Free and Go, when available. The retirement does not apply to the OpenAI API or to Codex sessions signed in with an API key. If you run Codex with your own API key, check the API models page for current availability.

A config.toml line model = "gpt-5.5" is struck through and replaced by gpt-6.1-sol for Plus, Pro, Business, Enterprise and Edu plans, or gpt-6-luna for Free and Go plans in the desktop app.
GPT-5.5 retired from Codex with ChatGPT sign-in on October 14, 2026. Replace it in config.toml, profile files, custom agents and scripts; API-key sessions keep it.

A quick migration checklist:

  1. Search your configs: grep -rn "gpt-5" ~/.codex/ .codex/ 2>/dev/null
  2. Update model in ~/.codex/config.toml, every profile file and project config.
  3. Update custom agents and scheduled tasks that select a model.
  4. Update scripts and CI jobs that call codex exec -m or --model with an old ID.
  5. Run one known task with the new model and compare effort settings, since efforts do not map one to one.

Local and custom providers

Codex is not limited to OpenAI-hosted models. Pass --oss to run against a local provider such as Ollama or LM Studio, choose one per run with --local-provider, or set a default:

oss_provider = "ollama" # or "lmstudio"

If neither is set, the interactive CLI asks you to choose and codex exec exits with an error. For a gateway or another hosted provider, define it under [model_providers.<id>] and select it with model_provider. As of October 2026, current Codex releases require a Responses API endpoint and do not support wire_api = "chat". If you want a CLI built around many providers from the start, our OpenCode vs Codex comparison covers the tradeoffs, and OpenCode models shows how OpenCode selects and configures them. To give any of these models extra tools, see our Codex MCP guide.

Where VibeiDE fits

VibeiDE is a desktop app that coordinates the Codex, Claude Code and OpenCode CLIs you already installed. Codex runs in an embedded terminal that shows the original CLI interface, and each user signs in to their own provider accounts, so provider subscriptions, usage and costs stay separate from the VibeiDE license. Each project has its own task queue and its own parallel limit per provider, and plan council has one provider draft a plan and the other review it before you decide to implement. See VibeiDE for Codex.

Takeaways

  • As of late October 2026, the recommended Codex models are GPT-6.1 Sol for complex work, GPT-6 Luna for focused repeatable tasks, Astra for the hardest end-to-end work and the new GPT-6.1 Terra for fast writing and visual tasks.
  • Switch with /model in a session, --model or -m for one run, or model in ~/.codex/config.toml as a default.
  • Flags beat project config, which beats profiles, which beat your user config.
  • Treat model_reasoning_effort as a second dial; start low and raise it only when a task needs it.
  • GPT-5.5 retired from Codex with ChatGPT sign-in on October 14, 2026. Update configs, profiles, agents and scripts that still name it.

New to Codex? Start with installing the Codex CLI, then read how the Codex sandbox controls what the model can touch.

Share this article

Post on XShare on LinkedIn

Related articles

Necessary cookies support sign-in, security, your language and this choice. Optional categories stay off until accepted.

First-party page views and acquisition measurement, plus Google Analytics 4 (Google Ireland, data may reach the US). Advertising personalization stays off.

With Analytics enabled, retain Google, Microsoft and Reddit ad click identifiers and share download, signup, activation and purchase conversions with the relevant ad provider. No personalized advertising.

Privacy · Cookie inventory