Routing profiles
Profiles choose the first configured provider from an ordered list. This prevents accidental premium usage while keeping fallback options.
How selection works
1. Read the requested profile.
2. Resolve the ordered provider:model list.
3. Pick the first configured provider in that list.
4. Fall back to eco or quality defaults when needed.
Auto mode
When profile=auto, the router picks a profile using cheap heuristics based on the last user message. It biases toward shorter, cheaper models when possible.
Custom routes
ROUTE_ECO_FAST=openai:gpt-5-mini,anthropic:claude-haiku-4-5,openrouter:google/gemini-2.5-flash ROUTE_ECO_BALANCED=openai:gpt-5-mini,anthropic:claude-sonnet-4-6,openrouter:google/gemini-2.5-pro ROUTE_PREMIUM_REASONING=openai:gpt-5,anthropic:claude-sonnet-4-6,openrouter:openai/gpt-5.1 ROUTE_CODE=openai:gpt-5.1-codex-mini,anthropic:claude-sonnet-4-6,openrouter:qwen/qwen3-coder
Overrides
You can request a provider directly by setting `provider`.
Custom model ids are blocked unless `ALLOW_CUSTOM_MODEL_ID=true`.