Agents & Editors
Aider
Connecting Aider to an Adaptive Router through its OpenAI-compatible settings and a model settings file.
Aider is a pair-programming agent for the terminal. It connects to Multi-Router as an OpenAI-compatible API, with the router header added through a model settings file.
Creating the router
Aider connects through an Adaptive Router, which accepts OpenAI Chat Completions requests and serves each one with the model it names, using the organization's provider key for that model's provider. Aider holds only the Multi-Router API key. See Adaptive Router. To set it up:
- In Model Groups, create or choose a model group with the models Aider should use. See Model Group.
- In Routers, choose New router, then Adaptive Router. Name it, choose the model group, and switch on the models to serve.
- Choose the organization's provider key for each provider in the group, and create the router. Its id, such as
rt_XXXXXXXX, is on the router's page. - In API Keys, create a key with the
inferencescope. It can be limited to this router. See API Key.
Every request carries the router id in the X-MR-Router header and the API key as a Bearer token, both set in Aider's settings below.
Settings
Aider takes the address and key from OPENAI_API_BASE and OPENAI_API_KEY. The router header goes in a model settings file, under extra_params.extra_headers for each model:
Aider reads .aider.model.settings.yml from the home directory, the repository root or the current directory, or the file named with --model-settings-file. Set weak_model_name to a model the router serves, because Aider sends its smaller tasks, such as commit messages, to the weak model.
Models
An Adaptive Router names models by their Multi-Router catalog id, provider/model, such as anthropic/claude-sonnet-4.6, openai/gpt-5 or google/gemini-2.5-flash. The model must be switched on in the router's model group; a request for any other model is refused with a message listing the models the router serves. The settings on this page list each model id explicitly.
Aider names OpenAI-compatible models with an openai/ prefix, so the catalog id anthropic/claude-sonnet-4.6 is openai/anthropic/claude-sonnet-4.6 in --model and in the model settings file. Aider edits files through edit formats in the reply text, such as whole, rather than through tool calls.
Checking the setup
The request then appears in Traffic with the Adaptive Router in the Router column and the model, tokens and cost in the request detail. A reply with the requested model or router was not found means the router id is wrong, or the API key is not allowed to use that router. See Traffic and Troubleshooting.