> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fabricgateway.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fabricgateway.ai/_mcp/server.

# LLM Model Router plugin

> Reference for the model router (`llm-model-router`) plugin, which routes a request to the connections that serve the model it names.

The model router (`llm-model-router`) gives a route one base URL for many providers. The client names a model as `<provider>/<model>`, for example `openai/gpt-4o`, or by an alias with no `/`. The plugin picks the route's connections that serve that model and speak the endpoint the client called, tries them in order until one answers, and relays the answer. It rewrites only the `model` field of the request body. It doesn't translate between provider formats.

## Where it runs

|             |              |
| ----------- | ------------ |
| Protocols   | LLM routes   |
| Scope kinds | `route` only |
| Phase       | Request      |

The failure mode is fixed: a request that the plugin can't handle is never forwarded.

## Configuration

**`providers`** `object` — required

Groups the route's connections under a provider name. The client uses that name as the model prefix. You choose the name, and it doesn't have to match the connection's provider.

---

**`providers.<name>.strategy`** `string` — required

`fallback` tries the connections in list order. `loadbalance` picks the first connection by `weight`, and then tries the rest in list order.

---

**`providers.<name>.services`** `array of objects` — required

The connections in the group. Each has a `name` and, for `loadbalance`, a positive `weight`. A `fallback` group takes no `weight`.

---

**`aliases`** `object`

Maps a model name with no `/` to an ordered list of targets. Each target has a `provider` group and the `model` ID sent to it. Later targets are fallbacks.

---

A connection serves exactly the models on its allowed models list, so each connection in a group needs that list. The console has no form for this plugin, so you enter the configuration as JSON. Fabric checks it when you save an enabled instance. A disabled instance isn't checked until you enable it. For the checks, see [Fix a configuration that Fabric refuses](/configure/routing/model-router#fix-a-configuration-that-fabric-refuses).

## Example

```json
{
  "name": "router",
  "plugin_id": "llm-model-router",
  "scope": { "kind": "route", "name": "router" },
  "config": {
    "providers": {
      "openai": {
        "strategy": "loadbalance",
        "services": [
          { "name": "openai-us", "weight": 3 },
          { "name": "openai-eu", "weight": 1 }
        ]
      },
      "anthropic": {
        "strategy": "fallback",
        "services": [{ "name": "anthropic-primary" }, { "name": "anthropic-bedrock" }]
      }
    },
    "aliases": {
      "claude-sonnet": [
        { "provider": "anthropic", "model": "claude-sonnet-4-5" },
        { "provider": "openai", "model": "gpt-4o" }
      ]
    }
  }
}
```

## Related guides

* [Route requests by model name](/configure/routing/model-router)
* [Define model aliases](/configure/routing/aliases)