Feature Request: Allow switching model mid-session
Currently, the codex-cli interactive session is locked to whatever model you specified at launch. If you want to try a different model you need to exit and restart the session. This breaks my workflow and makes it hard to optimize for speed, cost, and capability.
Describe the solution you'd like
Allow a built-in command (e.g. /model <model-name>) to switch the active model on the fly without ending the session or losing chat history.
Example usage:
> codex-cli --model gpt-4.1
… (exploring codebase with gpt-4.1)
> /model o3
Switched model to o3.
… (brainstorming/design with o3)
> /model o4-mini
Switched model to o4-mini.
… (implementation with o4-mini)
Additional context
I use this pattern extensively in the Zed editor Agents panel, switching between heavy models for high-level design and lighter ones for rapid coding. Being able to do this in codex-cli would greatly improve both my productivity and cost efficiency.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗