Agents & Editors
Amp
Connecting Amp to an Adaptive Router through a Custom URL connection in Model Routing.
Amp is a coding agent for the terminal and editors. It connects to Multi-Router through a Custom URL connection in its Model Routing settings, with the Chat Completions format and the router header. Amp sends model requests from its own servers, not from the developer's machine, so the connection is set up in the Amp account rather than in a local file.
Creating the router
Amp 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. Amp 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 Amp 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 Amp's settings below.
Settings
In Amp, open Settings, then Model Routing, choose Add Provider, then Custom URL, and fill in the fields below. Workspace admins can add the same connection for the whole workspace under the workspace's Model Routing settings.
| Field | Value |
|---|---|
| API format | chat-completions |
| Base URL | https://api.multi-router.ai/v1 |
| API key | The Multi-Router API key, sent as a Bearer token |
| Headers | X-MR-Router: rt_XXXXXXXX, marked Secret if preferred |
| Model mapping | One line per model, mapping Amp's model name to the catalog id with -> |
Amp adds the Chat Completions path to the base URL. A new connection can start inactive; activate it, and give it priority over other connections that serve the same models, from Model Routing or with amp config model-providers. Amp's servers call Multi-Router over the public internet.
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.
A model mapping line names the model Amp would use on the left and the Multi-Router catalog id on the right, for example <Amp model name> -> anthropic/claude-sonnet-4.6. For a model Amp does not know, set its token limits and tool support under Model Metadata Overrides.
Checking the setup
Test the connection with amp config model-providers test <connection-id>, then start an Amp thread on a mapped model and say hello.
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.