Skip to content

Instantly share code, notes, and snippets.

@garyblankenship
Created March 18, 2025 00:28
Show Gist options
  • Save garyblankenship/edbafee4cac5bd462ca5165f9b11dce6 to your computer and use it in GitHub Desktop.
Save garyblankenship/edbafee4cac5bd462ca5165f9b11dce6 to your computer and use it in GitHub Desktop.
Aider Models, and Modes

Understanding Aider: Models and Modes for Developers

Part 1: Aider Basics - Getting Started with Simple Setups

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

Core Modes in Simple Setups

Even with a single model, Aider offers different interaction modes:

  1. /code Mode: The default mode where you make requests and Aider modifies your code
  2. /ask Mode: For asking questions about your code without making changes
  3. /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.

Part 2: Advanced Aider Configurations - For Power Users

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.

The Full Power User Model Setup

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

Advanced Modes and Model Interactions

The flexibility becomes more powerful (but potentially confusing) with advanced modes:

/architect Mode

  • 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

How Models Work Across Advanced Modes

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)

Context Management for Power Users

This is where advanced setups can get tricky! Context doesn't always flow perfectly between models:

  1. In /architect mode, the editor model only receives the architect's last solution, not your full conversation history
  2. If you reject edits and ask follow-up questions, the context might feel disconnected
  3. Power users sometimes need to manually reconstruct context from aider.history

Advanced Workflow Patterns

To maintain context effectively in complex setups:

  1. Use /ask mode for exploration with your main model
  2. Switch to /code mode when ready for implementation
  3. Or use /architect mode but provide complete context in follow-ups

When to Use Advanced Configurations

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment