Aider

Aider

Aider is a terminal-based AI pair programmer. It can run any OpenAI-compatible endpoint by changing two environment variables, then selecting a model with the openai/ prefix.

Setup

  1. Install Aider: python -m pip install aider-chat.
  2. Point it at LivRouter:
bash
export OPENAI_API_BASE_URL="https://api.livrouter.com/v1"export OPENAI_API_KEY="your-livrouter-api-key"
  1. Start a session with a catalog model ID:
bash
aider --model openai/glm-5.3

The openai/ prefix tells Aider's model routing to use the OpenAI-compatible path with the base URL above. Any current ID from the model catalog works the same way — for example openai/claude-sonnet-4-6.

Verify the setup

Run aider inside a git repository and ask for a small edit. If the edit lands and the request appears in your LivRouter usage logs, the routing works.

Troubleshooting

  • 401 or unauthorized — the key must be a LivRouter key created on the API keys page.
  • Model name errors — keep the openai/ prefix and use the exact catalog ID; drop the prefix only if you change to a native provider.
  • Variables disappear between sessions — add both export lines to ~/.bashrc or ~/.zshrc, or use setx on Windows.

See the API quickstart for the underlying request format.