Aider Integration
Use Antbase with Aider, the CLI AI pair programming tool. Get intelligent model routing for code editing sessions with automatic failover across providers.
What this enables
- AI pair programming in your terminal with Antbase routing
- Automatic git commits for AI-generated changes
- Multi-file editing with intelligent model selection
- Failover across 30+ providers -- your coding session never drops
Quick Start
1. Install Aider
pip install aider-chat2. Set environment variables
export OPENAI_API_BASE=https://antbase.ai/v1
export OPENAI_API_KEY=your-ant-api-key3. Start Aider
aider --model openai/ant:coderThe openai/ prefix tells Aider to use the OpenAI-compatible API.
Ready to code
Add files with /add filename.py and start describing changes.
Configuration
You can also pass the base URL as a flag:
aider --openai-api-base https://antbase.ai/v1 \
--openai-api-key your-ant-api-key \
--model openai/ant:coderOr create an .aider.conf.yml in your project root:
# .aider.conf.yml
openai-api-base: https://antbase.ai/v1
openai-api-key: your-ant-api-key
model: openai/ant:coderUsage Examples
Different models for different tasks
# Quick bug fixes -- use fast model
aider --model openai/ant:fast
# Complex refactoring -- use best model
aider --model openai/ant:best
# General coding -- use coder model
aider --model openai/ant:coder
# Architecture planning -- use reasoning model
aider --model openai/ant:reasoningArchitect mode
Use a reasoning model for architecture and a coder model for edits:
aider --model openai/ant:reasoning \
--editor-model openai/ant:coderVirtual Models
| Model | Best for | Notes |
|---|---|---|
| openai/ant:auto | General use | Picks optimal model per request |
| openai/ant:fast | Quick fixes | Low latency for small changes |
| openai/ant:best | Complex refactoring | Frontier models for large changes |
| openai/ant:free | Testing | Zero cost for experimentation |
| openai/ant:reasoning | Architecture | Deep reasoning for design decisions |
| openai/ant:coder | Code generation | Best default for Aider sessions |
Note the openai/ prefix -- this tells Aider to use the OpenAI-compatible provider. See Virtual Models for the full list.
Troubleshooting
Model not recognized
Always prefix model names with openai/. Without the prefix, Aider tries to match against its built-in model list.
Edit format issues
If the model struggles with Aider's edit format, try --edit-format whole for simpler whole-file edits instead of the default diff format.