multi-router.aidocs

Agents & Editors

Cline

Connecting Cline to an Adaptive Router through its OpenAI Compatible API provider.

Cline is a coding agent for VS Code. It connects to Multi-Router through its OpenAI Compatible API provider, which can send custom headers. Cline's Anthropic provider cannot send custom headers, so it cannot name a router.

Creating the router

Cline 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. Cline holds only the Multi-Router API key. See Adaptive Router. To set it up:

  1. In Model Groups, create or choose a model group with the models Cline should use. See Model Group.
  2. In Routers, choose New router, then Adaptive Router. Name it, choose the model group, and switch on the models to serve.
  3. 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.
  4. In API Keys, create a key with the inference scope. 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 Cline's settings below.

Settings

In Cline's settings, choose OpenAI Compatible as the API Provider and fill in the fields below:

FieldValue
Base URLhttps://api.multi-router.ai/v1
OpenAI Compatible API KeyThe Multi-Router API key
Model IDUse custom model ID, then a catalog id such as anthropic/claude-sonnet-4.6
Custom HeadersAdd Header, with name X-MR-Router and value rt_XXXXXXXX

Under Model Configuration, set the model's context window size and maximum output tokens, and Supports Images if the model accepts images.

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.

Checking the setup

Start a new Cline task 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.

ZedKilo Code
Was this helpful?