How it works
Every message is classified into one of five task types:
The router then applies rules in priority order:
- Per-task override — if you’ve pinned a specific model to a task type, it always wins
- Self-learning — if enough samples have been collected, the router uses the model with the highest success rate
- Budget fallback — if your monthly budget is above the threshold, non-critical tasks switch to the fallback model
- Ollama routing — background tasks can be sent to a local Ollama model at zero API cost
- Task-type defaults — the table above
Configure the router
Go to Settings → Model Router.Primary and fallback models
Primary Model is used for most tasks. Sonnet 4.6 is a good default — capable enough for most work, cheaper than Opus. Budget Fallback Model kicks in when your monthly budget exceeds the threshold. Haiku is the recommended fallback — fast and very cheap.Budget threshold
The slider controls what percentage of your monthly budget triggers the fallback. Default is 80% — meaning the last 20% of your budget is protected for critical tasks.Self-learning
When enabled, the router tracks which models succeed or fail on each task type. After collecting enough samples (default: 20), it automatically adjusts routing to prefer higher-performing models. To prevent self-learning from changing routing for a task type, click the lock icon next to that task in the per-task overrides table.Ollama (local models)
If you run Ollama locally, the router can send background tasks (summaries, chat) to a local model instead of the API — reducing cost to zero for those task types. Enable it in Settings → Model Router → Local Ollama Routing and set your Ollama base URL (default:http://localhost:11434).
Recommended local model: llama3.2 for general use, codellama for code tasks.