If you're new to Aider, the AI coding assistant, you can start with a straightforward setup that avoids confusion. The simplest way to use Aider is with a single model:
aider --model sonnet
With this basic setup:
- You're using just one AI model for everything
- No need to worry about different editor models or weak models
- The same model handles thinking about solutions and writing code changes
Even with a single model, Aider offers different interaction modes:
/code
Mode: The default mode where you make requests and Aider modifies your code/ask
Mode: For asking questions about your code without making changes/help
Mode: For getting assistance with using Aider itself
This simple configuration works well for most everyday coding tasks and is perfect for getting familiar with Aider. There's no confusion about which model handles what - your chosen model does everything.
Once you're comfortable with Aider basics, you might want to explore more flexible setups that can optimize costs and performance - but be prepared for added complexity.
Advanced users can configure up to three separate models:
- Main model: Your primary, most capable model (set with
--model
) - Editor model: Specifically for generating code edits (set with
--editor-model
) - Weak model: A lighter model for simple tasks like commit messages (set with
--weak-model
)
For example, this complex configuration:
aider --architect --model o3-mini --reasoning-effort high --editor-model sonnet --weak-model gpt-3.5-turbo
The flexibility becomes more powerful (but potentially confusing) with advanced modes:
- Uses your main model to design solutions
- Then uses your editor model to implement code changes
- Perfect for complex problems needing careful planning
- Context limitation: Only the architect's response gets passed to the editor model
With a configuration like: aider --architect --model o3-mini --reasoning-effort high --editor-model sonnet
Mode | Thinking Model | Editing Model |
---|---|---|
/architect |
o3-mini | sonnet |
/code |
o3-mini | sonnet |
/ask |
o3-mini | (no edits) |
This is where advanced setups can get tricky! Context doesn't always flow perfectly between models:
- In
/architect
mode, the editor model only receives the architect's last solution, not your full conversation history - If you reject edits and ask follow-up questions, the context might feel disconnected
- Power users sometimes need to manually reconstruct context from
aider.history
To maintain context effectively in complex setups:
- Use
/ask
mode for exploration with your main model - Switch to
/code
mode when ready for implementation - Or use
/architect
mode but provide complete context in follow-ups
These flexible setups shine when:
- You want to use an expensive, powerful model for planning but a cheaper model for routine code edits
- You're working on complex architectural problems that benefit from the separation of design and implementation
- You're optimizing for cost efficiency across different types of operations
Most developers new to Aider should stick with the simple setup until they have a compelling reason to add complexity. The power and flexibility of advanced configurations come with a learning curve that's only worth climbing for specific use cases.