Agents & CLIsReference / 21

Aider

AI pair programming in your terminal, billed through RouterPlex.

Follow updates Share setup

Aider treats any OpenAI-compatible endpoint as an openai/-prefixed model:

bash
export OPENAI_API_BASE="https://api.routerplex.com/v1"
export OPENAI_API_KEY="sk-..." # your RouterPlex key
 
aider --model openai/claude-opus-4-8

Or persist it in ~/.aider.conf.yml:

yaml
openai-api-base: https://api.routerplex.com/v1
openai-api-key: sk-...
model: openai/claude-opus-4-8
weak-model: openai/claude-haiku-4-5

Note: the openai/ prefix tells Aider which wire format to use — the part after the slash must be a RouterPlex model ID verbatim.

Verify the connection #

Open a small test repository and ask Aider a read-only question before allowing edits. Check the RouterPlex key logs to confirm the intended model handled the request. A 401 response usually means Aider cannot see OPENAI_API_KEY; a model-not-found response means the value after the openai/ prefix does not match a current model ID.

Choose keys and models deliberately #

Give Aider its own RouterPlex key with a hard budget so its usage stays separate from production traffic. A cheaper weak model can handle repository summaries while the main model handles edits, but test the pair on your codebase rather than assuming every model follows tool instructions equally well. Both model IDs use the same RouterPlex balance and endpoint.

Aider — Docs