Skip to content

Codex Models — Which One to Use

Codex supports multiple OpenAI models. Default is gpt-5.4. You can switch per-session or set a permanent default.

Available Models

ModelBest ForTrade-off
gpt-5.4General coding, reasoning, tool useBalanced speed and capability
gpt-5.3-codexComplex refactors, large codebasesSlower, higher quality
gpt-5.4-miniQuick tasks, subagentsFaster, less thorough
gpt-5.3-codex-sparkInstant iteration, prototypingResearch preview, Pro only

gpt-5.4

The default. Handles most professional coding work well. Strong at reasoning through multi-step problems. Good tool use for file edits, searches, and commands.

Use for: daily coding, debugging, code review, feature implementation.

gpt-5.3-codex

Industry-leading for pure coding tasks. Thinks longer, produces higher quality code. Better at complex architectural changes.

Use for: major refactors, migrating frameworks, untangling legacy code.

Downside: slower response times.

gpt-5.4-mini

Fast and cheap. Good enough for straightforward tasks. Codex uses this internally for subagents when speed matters more than depth.

Use for: simple renames, formatting, quick lookups, cost-sensitive automation.

gpt-5.3-codex-spark

Research preview for ChatGPT Pro subscribers. Optimized for near-instant responses. Good for rapid iteration when you’re exploring approaches.

Use for: brainstorming, quick prototypes, when you want immediate feedback.

Setting Your Model

In config.toml

Set your default:

model = "gpt-5.4"

Via CLI Flag

Override for a single session:

codex -m gpt-5.3-codex

Mid-Session

Switch without restarting:

/model gpt-5.4-mini

The TUI shows current model in the status bar.

Reasoning Effort

Some tasks need deeper thinking. Control this with model_reasoning_effort:

model_reasoning_effort = "medium"

Levels: minimal, low, medium, high, xhigh

Higher effort = more reasoning tokens = slower responses but better solutions.

When to increase:

  • Debugging race conditions
  • Architectural decisions
  • Complex algorithm implementation

When to keep low:

  • Simple edits
  • File organization
  • Routine refactors

Cost Perspective

Two ways to pay:

ChatGPT Subscription — Fixed monthly cost (Plus, Pro, etc.). Good for individual developers doing interactive work. Usage limits apply.

API Key — Pay per token. Better for:

  • Heavy usage exceeding subscription limits
  • CI/CD automation
  • Predictable per-project billing

Use /status in the TUI to check token usage during a session.

Model Selection Strategy

My recommendation:

  1. Start with gpt-5.4 — It handles 90% of tasks well
  2. Switch to gpt-5.3-codex for major refactors or when gpt-5.4 struggles
  3. Use gpt-5.4-mini for quick automation tasks
  4. Try Spark if you’re on Pro and want faster iteration

Don’t overthink it. The default is good. Switch when you notice quality or speed issues.

Subagent Models

When using multi-agent features, Codex spawns subagents for parallel tasks. Control their model:

[agents]
max_threads = 6
max_depth = 3

Subagent model selection is configured per-agent via [agents.<name>] sub-tables with a config_file pointing to a separate TOML. Using a smaller model for subagents saves tokens.