Codex Model Selection

Codex supports multiple models. Understanding the characteristics of each model helps you choose the right one for your scenario.

Desktop version can switch at the bottom right corner of the input box

Codex CLI can be used/modelCommand Switching:


Available Models

Codex currently supports the following models:

ModelTypeFeaturesApplicable scenarios
gpt-5.4FlagshipStrongest capability, deep reasoningComplex tasks, architecture design
gpt-5.4-miniLightweightFast response, lower costSimple tasks, rapid iteration
gpt-5.3-codexProProgramming optimization, code specializationCode writing, bug fixing
gpt-5.3-codex-sparkFastUltra-fast response, high-frequency interactionReal-time collaboration, quick Q&A

Detailed explanation of model features

GPT-5.4

Flagship model, offering the strongest reasoning and creative capabilities.

FeaturesDescription
Reasoning DepthDeep analysis of complex problems
Context UnderstandingUnderstanding large codebase structure
Multi-step TasksHandling complex workflows
AccuracyHigh accuracy, reduced rework

Applicable scenarios

  • Architecture design and refactoring
  • Complex bug analysis and fixing
  • Multi-module coordinated development
  • Code review and quality analysis

GPT-5.4-mini

Lightweight model, fast response, suitable for daily development.

FeaturesDescription
Response SpeedFaster than flagship models
Cost EfficiencyLower token consumption
Daily TasksSuitable for routine development operations

Applicable scenarios

  • Simple feature implementation
  • Code formatting and refactoring
  • Documentation Writing
  • Quick Q&A

GPT-5.3-Codex

A model specifically optimized for programming tasks.

FeaturesDescription
Code ExpertiseTrained specifically for programming tasks
Language CoverageSupports multiple programming languages
Code QualityHigh-quality generated code

Applicable scenarios

  • Code writing and generation
  • Bug fixing and debugging
  • Code Refactoring
  • Test Writing

GPT-5.3-Codex-Spark

Ultra-fast response model, suitable for high-frequency interaction scenarios.

FeaturesDescription
Ultra-fast ResponseFastest response speed
Real-time CollaborationSuitable for interactive development
Pro ExclusiveAvailable only in the Pro plan

Applicable scenarios

  • Real-time code Q&A
  • Rapid prototype validation
  • High-frequency iterative development

Reasoning intensity configuration

You can adjust the model's reasoning effort to balance speed and depth.

Reasoning intensity levels

LevelDescriptionFeatures
minimalMinimal ReasoningFastest response, suitable for simple tasks
lowLow Reasoning IntensityFast but with some analysis
mediumMedium ReasoningBalanced speed and depth (default)
highHigh Reasoning IntensityDeep analysis, suitable for complex tasks
xhighUltra-high ReasoningStrongest reasoning, slowest response

Configure reasoning intensity

Reasoning intensity settings

# CLI Designation
codex --reasoning-effort high

# Configuration File
[mycode4 type="toml"]
model_reasoning_effort = "high"
# Switch in Session /model gpt-5.4 --reasoning-effort xhigh [/mycode4]

Reasoning Summary

Control how much detail Codex displays in its reasoning process.

Summary Mode

ModeDescription
autoAutomatically determines level of detail (default)
conciseBrief Summary
detailedDetailed reasoning process
noneDo not show reasoning summary

Reasoning summary settings

# ~/.codex/config.toml
model_reasoning_summary = "detailed"

Model Switching

Switch between different models for different scenarios.

Switching Method

Switch model

# CLI Slash Commands
/model gpt-5.4
/model gpt-5.4-mini
/model gpt-5.3-codex

# With Reasoning Strength
/model gpt-5.4 --reasoning-effort high

# In-App Switching
Click the model selector to select the target model

Scenario switching suggestions

ScenariosRecommended ModelReasoning Strength
Architecture Designgpt-5.4high/xhigh
Complex Refactoringgpt-5.4high
Bug Fixgpt-5.3-codexmedium
Daily Codinggpt-5.4-minilow/medium
Quick Q&Agpt-5.4-miniminimal
Real-time Collaborationgpt-5.3-codex-sparkminimal

Service Tier

Choosing different service tiers affects response priority.

Service tier options

TierDescription
flexElastic service, responses may be slightly slower (default).
fastPriority service, faster response

Service tier settings

# ~/.codex/config.toml
service_tier = "fast"

Models & Plans

Model support varies by plan:

PlanAvailable Models
FreeBase Model
Plusgpt-5.4, gpt-5.4-mini, gpt-5.3-codex
ProAll models + Spark + higher limits.
API KeyBilled per token, supports mainstream models.

Cost Considerations

Token consumption comparison

ModelRelative Cost
gpt-5.4Highest
gpt-5.3-codexMedium-High
gpt-5.4-miniRelatively Low
gpt-5.3-codex-sparkLow

Cost optimization suggestions

  • Use mini or Spark models for simple tasks.
  • Use medium reasoning effort for daily development.
  • Use the flagship model and high reasoning effort only for complex tasks.
  • Use /compact to compress context and reduce token consumption.

Best Practices

Model selection principles

  • Choose a model based on task complexity
  • Balance response speed and reasoning depth
  • Prioritize accuracy for complex tasks
  • Prioritize response speed for high-frequency interactions

Configuration Suggestions

Recommended Configuration

# Daily Development Configuration
model = "gpt-5.4-mini"
model_reasoning_effort = "medium"
model_reasoning_summary = "auto"

# Temporary Switch for Complex Tasks
# /model gpt-5.4 --reasoning-effort high

FAQ

Q: Which model is best for code writing?

gpt-5.3-codex is optimized for programming tasks and is suitable for most code-writing scenarios.

Q: How to balance speed and quality?

For daily tasks, use gpt-5.4-mini with medium reasoning intensity; switch to gpt-5.4 with high reasoning intensity for complex tasks.

Q: What are the advantages of the Spark model?

The Spark model responds the fastest, suitable for high-frequency interaction and real-time collaboration, and is only available in the Pro plan.

Q: How does reasoning intensity affect results?

Higher reasoning effort means Codex will perform deeper analysis, but response time will be longer.

other extensions