Routing Modes
Each model alias can be assigned one of three routing modes:| Mode | Behavior |
|---|---|
auto | Use direct provider if a key and implementation are available; fall back to OpenRouter |
direct | Force direct provider; fall back to OpenRouter with a warning if unavailable |
openrouter | Always route through OpenRouter regardless of available keys |
auto.
Configuration
Setdefault_mode to apply a mode to all models, then override per-alias as needed:
Auto Mode (Default)
Inauto mode, the router checks whether a direct provider implementation exists for the model’s vendor and whether an API key is configured for that vendor. If both are true, the request goes direct. Otherwise it falls back to OpenRouter.
Currently, Anthropic is the only vendor with a direct provider implementation. So in auto mode:
claude-opus,claude→ direct Anthropic API (ifANTHROPIC_API_KEYis set), otherwise OpenRoutergpt,gemini,grok,nemotron→ OpenRouter
Per-Alias Routing
Override routing for specific models:Routing Decisions in Transcripts
EveryModelResponse includes a routing field that records the vendor, mode, and whether OpenRouter was used for that specific call. Use this to audit which provider handled each response.