/model
Switches the Main Model of the running Aider session to a new LLM.
/model <name> switches the main model that generates Aider's suggestions and code changes, for the running session. Without an argument, Aider shows a list of matching models. The main model can also be set directly at startup with --model (env var AIDER_MODEL); in architect mode it's the planning model, while --editor-model separately writes the file edits.
โ WHEN TO USE IT?
Upgrade the model mid-session for a harder subtask
/model anthropic/claude-opus-4 โ before a complex multi-file refactor
Switch provider without restarting the session
/model gemini/gemini-2.5-pro โ when a different API key is cheaper or available right now
โ WHEN NOT TO?
The model should already be fixed for the whole session
Switching with /model later doesn't reset the model context automatically; if you already know the model, there's no need to start and then switch.
Better: Set --model directly at startup, e.g. aider --model anthropic/claude-sonnet-4-5
Just want to briefly try a different model without losing session state
/model switches permanently for the rest of the session and also changes subsequent answers.
Better: Start a second Aider instance with --model in another terminal to compare in parallel
SOURCES
- Aider Docs โ In-chat Commands โ aider.chat