Aider
AI pair programming in your terminal, working on your git repo. Step-by-step setup with Laras Router.
On this page
This guide connects Aider to Laras Router. Every step was checked against the Aider documentation.
You need an API key (lr_live_…) and a topped-up balance. New to Laras Router? Start with the Quickstart.
Set up
Install Aider
python -m pip install aider-install
aider-install
Point Aider at Laras Router
Point Aider’s OpenAI-compatible client at Laras Router.
export OPENAI_API_BASE="https://api.larasrouter.com/v1"
export OPENAI_API_KEY="lr_live_your_key_here"
Start Aider
Run Aider in your project with the openai/ prefix on the model name.
cd /path/to/your/project
aider --model openai/deepseek-v4.1-flash
Add model metadata (optional)
Optional: tell Aider the model’s limits and prices by saving .aider.model.metadata.json in your home directory or repo root.
{
"openai/deepseek-v4.1-flash": {
"max_tokens": 384000,
"max_input_tokens": 1000000,
"max_output_tokens": 384000,
"input_cost_per_token": 0.0000004,
"output_cost_per_token": 0.0000016,
"litellm_provider": "openai",
"mode": "chat"
}
}
Good to know
- The
openai/prefix is required. It tells Aider to send requests to the base URL inOPENAI_API_BASE. - Without the metadata file Aider warns about an unknown context window and uses defaults; the warning is safe to ignore. Aider’s cost display is an estimate; the console shows what you were billed.
Settings and screens can change between versions. If something looks different, check the Aider documentation. For other tools, see all integrations.
Was this page helpful?
Updated Nov 2026