πŸ€– AI Tools
Β· 3 min read
Last updated on

How to Use MiMo V2 Pro with Aider β€” Setup Guide


πŸ“’ Update: MiMo V2.5 Pro is now available β€” significantly improved over V2. See the V2.5 complete guide, how to use the API, and V2.5 vs V2 Pro comparison.

MiMo V2 Pro is Xiaomi’s coding model that punches above its weight on benchmarks. Combined with Aider (the best open-source AI coding tool), you get a powerful and cheap coding setup. Here’s how to set it up.

Update (April 23, 2026): Xiaomi released MiMo V2.5 Pro, which scores 57.2% on SWE-bench Pro and uses 40-60% fewer tokens than Opus 4.6. See our V2.5 Pro complete guide for details. For Claude Code setup with V2.5, see the V2.5 Pro Claude Code integration guide.

Setup via OpenRouter

The easiest way to use MiMo V2 Pro with Aider is through OpenRouter:

# Set OpenRouter as the API provider
export OPENROUTER_API_KEY=sk-or-v1-your-key

# Run Aider with MiMo V2 Pro
aider --model openrouter/xiaomi/mimo-v2-pro

That’s it. Aider handles the rest β€” file editing, git commits, and multi-file changes.

Setup via direct API

If you prefer the direct Xiaomi API:

export OPENAI_API_BASE=https://api.xiaomi.com/v1  # Check current endpoint
export OPENAI_API_KEY=your-xiaomi-key

aider --model mimo-v2-pro

Aider configuration

Create an .aider.conf.yml for persistent settings:

# .aider.conf.yml
model: openrouter/xiaomi/mimo-v2-pro
auto-commits: true
auto-test: true
test-cmd: npm test  # or pytest, go test, etc.

Using MiMo for cheap tasks, Claude for complex ones

Aider supports model switching. Use MiMo for routine coding and Claude for complex architecture decisions:

# Start with MiMo (cheap)
aider --model openrouter/xiaomi/mimo-v2-pro

# Inside Aider, switch to Claude for a complex task
/model anthropic/claude-sonnet-4.6

This is the approach we use in the AI Startup Race β€” the Xiaomi agent uses MiMo V2 Pro as its primary model with the option to escalate to a more capable model when needed.

What MiMo V2 Pro is good at

  • Fast code generation β€” quick responses for routine coding
  • Refactoring β€” handles rename, extract function, move code well
  • Test writing β€” generates decent test cases
  • Bug fixes β€” good at simple to moderate bugs

What it struggles with

  • Complex architecture β€” doesn’t plan as well as Claude or Kimi
  • Large context β€” smaller context window than frontier models
  • Subtle bugs β€” misses edge cases that DeepSeek R1 catches with reasoning

MiMo V2 Pro vs other Aider backends

ModelQualitySpeedCostBest for
MiMo V2 ProGoodFast~$25/mo APIRoutine coding, budget
DeepSeek R1Good (reasoning)Slow~$25/mo APIDebugging, complex logic
Claude SonnetExcellentFast$20/mo subBest quality
Devstral Small (local)GoodMediumFreePrivacy, offline

See our Aider complete guide for all configuration options and our MiMo V2 family guide for model details.

Tips for best results

  1. Keep files focused β€” add only relevant files to Aider’s context with /add
  2. Be specific β€” β€œFix the null check in auth.js line 42” works better than β€œfix bugs”
  3. Use auto-test β€” let Aider run tests after each change to catch regressions
  4. Commit frequently β€” Aider’s auto-commit means you can always revert

Related: Aider Complete Guide Β· MiMo V2 Family Guide Β· MiMo V2 Pro vs Claude vs GPT Β· How to Use Aider with DeepSeek Β· Best Budget AI Models for Coding Β· AI Startup Race