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
- Install Aider:
python -m pip install aider-chat. - Point it at LivRouter:
export OPENAI_API_BASE_URL="https://api.livrouter.com/v1"export OPENAI_API_KEY="your-livrouter-api-key"- Start a session with a catalog model ID:
aider --model openai/glm-5.3The 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
exportlines to~/.bashrcor~/.zshrc, or usesetxon Windows.
See the API quickstart for the underlying request format.