Cost is not a later concern
Model costs often add up from the beginning. Wrong choices in context, tools, and fallback can quietly inflate bills before you notice.
What drives model cost
Costs in OpenClaw are usually amplified by:
- Long conversation history
- Tool definitions and tool calls
- Large inputs and system prompts
- Fallback triggers
- Repeated reasoning in long chains
Set basic limits
openclaw config set ai.dailyLimit 1000
openclaw config set ai.monthlyBudget 50
Verify:
openclaw config list | grep ai\.
Five levers that matter most
- Shorten history — Avoid keeping unnecessary context across turns.
- Fewer tools — Only mount tools the task actually needs.
- Tighten fallback — Trigger fallback only on real failures.
- Single model first — Add complexity only when a single model is stable.
- Separate tasks — Split high-frequency vs high-value jobs.
JSON cost control example
{
"costControl": {
"enabled": true,
"limits": {
"perRequest": 0.05,
"hourly": 5,
"daily": 20,
"monthly": 400
},
"actions": {
"onHourlyLimit": "slowdown",
"onDailyLimit": "alert_and_pause",
"onMonthlyLimit": "stop"
}
}
}
Provider-side limits
Do not rely only on OpenClaw. Set hard usage limits in your provider dashboards:
Next steps
- Model router
- Coding Plan providers
- Official docs → docs.openclaw.ai
- Issues → GitHub Issues