Aider + minirouter
Draft environment-variable and model-flag configuration for the Aider terminal client.
Settings
Environment variables + command line
In order
- OPENAI_API_BASEhttps://api.minirouter.sh/v1
- OPENAI_API_KEYmr-live-… (your key)
- --modelopenai/meta/llama-3.3-70b
The openai/ prefix tells Aider to use the OpenAI-compatible endpoint; everything after it is our model id.
export OPENAI_API_BASE=https://api.minirouter.sh/v1
export OPENAI_API_KEY=mr-live-YOUR-KEY-HERE
aider --model openai/meta/llama-3.3-70bDraft candidates · 4 models
All models →- Modelmeta/llama-3.3-70bWhyGeneral-purpose candidate for agent edits.→
- Modeldeepseek/deepseek-v3WhyReasoning-oriented candidate for multi-file work.→
- Modelmistral/devstral-small-2WhyCoding-oriented candidate for the weak-model role.→
- Modelmeta/llama-4-maverickWhyLong-context candidate for larger repository maps.→
Only rows confirmed in the current live catalog are linked. A plain row is a draft recommendation, not a claim that the model is currently available. Paste ids exactly as written, author/name.
When it fails
- SymptomAider warns the model is unknown and guesses a context windowCodeclient-side
Expected for custom endpoints — Aider's local metadata does not know our ids. The warning is cosmetic; requests still work.
- Symptom404, HTML, or a parse error on every requestCodeinvalid_request
Almost always the base URL. Use https://api.minirouter.sh/v1 — the bare host without /v1 also works, but never append /chat/completions to the base URL field; the client adds that path itself. docs/errors#invalid_request →
- Symptom401 on every requestCodeinvalid_api_key
Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies. docs/errors#invalid_api_key →
- Symptom402 before any tokens arriveCodeinsufficient_credits
Balance below the estimated cost of the request. Top up ($5 minimum) — and watch the x-minirouter-balance-usd header, the low-balance signal every response carries. docs/errors#insufficient_credits →
Every API error string carries a URL resolving to /docs/errors.