You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex could automatically use different models based on task type #9205
Leading agentic coding tools enable configurable model selection for different task types executed by the agent; Codex would benefit from adopting a similar approach.
Enable configuration of defaults via environment variables:
- model_reasoning: the model for complex reasoning and architecture decisions (e.g. gpt-5.2)
- model_execution: the model for code generation and implementation (e.g. gpt-5)
- model_tool: the model for tool execution or background functionality (e.g. gpt-4.1)
By default, in plan mode, Codex would automatically use model_reasoning for complex reasoning and architecture decisions and use model_tool for efficient execution of tools (find, grep, etc.). By delegating tool execution to the more efficient model and reasoning to the stronger model, we get the best of all worlds for efficient, speed and cost.
Support hybrid settings (e.g., gptplan), which use a stronger model (model_reasoning) for planning (still using model_tool when appropriate), then switch to a more efficient model (model_execution) for execution (still using model_tool when appropriate).
So in ~/.codex/config.toml:
model ="gpt-5.2"#model = "gptplan" # alternative hybrid
model_reasoning ="gpt-5.2"
model_execution ="gpt-5"
model_tool ="gpt-4.1"
This would be even beneficial with the plan mode described in #7355 and tracked in #2101
Additional information
No response
Reacted by Cedric Halbronn, subpandu, maheshvi-dev02, B3n01tH, gbohus, ziqi, Fred Miranda, Mario Filho, Muhammet Furkan Çakır, Marc Lopez Rubio and 32 more
Activity