How costs are tracked
Every model call is logged with:- Model used
- Input and output token counts
- Estimated cost (based on published pricing)
- Agent and pipeline that triggered it
/api/metrics endpoint.
Setting a monthly budget
Set a monthly spending threshold in Settings → General → Budget, or in~/.openclaw/openclaw.json:
budgetThreshold is a percentage (0–100). When monthly spend reaches this percentage of your limit, the model router automatically downgrades non-critical tasks to Claude Haiku 4.5 as a fallback.
Budget fallback behavior
When the budget threshold is hit:codeandresearchtasks continue using their configured model (they’re considered critical)summaryandchattasks are routed toclaude-haiku-4-5automatically- A warning banner appears in the dashboard
Cost-saving tips
- Use Haiku for high-volume, simple tasks (summaries, routing, triage)
- Use Sonnet for most reasoning tasks — best price/performance ratio
- Reserve Opus for genuinely complex tasks (architecture, deep analysis)
- Enable self-learning — the model router learns which models succeed on your tasks and routes accordingly over time
- Enable Ollama for local routing of simple tasks at zero API cost