Runbook — AI provider daily spend burn
Daily spend on one LLM provider is burning at 5× the trailing 7d rate. Often a precursor to the monthly-budget alert — catch and fix while there's still room.
| Field | Value |
|---|---|
| Severity | P1 (catches problems before they’re P0 monthly-budget) |
| Owner | @aphaiboon |
| Alert source | Watchtower — sum by (provider) (rate(cmmd_ai_cost_usd_total[1h])) * 24 > 5 * (trailing 7d avg) for 30m |
| Estimated time | 15 min |
| Required access | CMMD AdminApp, Railway |
Symptom
Section titled “Symptom”ntfy push: “DeepSeek (or other) burning at 23× normal — $42/day projected vs $1.80/day baseline”.
Most likely causes
Section titled “Most likely causes”Same as runbook-ai-provider-budget-breached, but earlier in the timeline. Investigation is identical — the difference is you have more headroom to fix without breaching budget.
Diagnose
Section titled “Diagnose”-
Open CMMD AdminApp → Reporting → AI cost-per-hour chart for the offending provider.
-
Confirm the spike is real (not a Prometheus blip — wait 5 min, re-check).
-
SQL drill-down:
SELECT date_trunc('hour', created_at) as hour,feature,COUNT(*) as requests,SUM(cost_cents)/100.0 as cost_usdFROM ai_agent_usage_logsWHERE created_at >= NOW() - INTERVAL '4 hours'AND provider = '<provider>'GROUP BY 1, 2ORDER BY hour DESC, cost_usd DESC; -
Look for: (a) sudden new feature with high spend, (b) one user dominating, (c) a worker that started firing more often.
Mitigate
Section titled “Mitigate”This is an early-warning alert — you have time to fix the root cause rather than slap an emergency throttle.
- Identify the root cause via the diagnosis SQL above.
- Open a Slack thread in
#alertswith the cause + a plan: “fix in code”, “raise budget”, or “throttle the feature”. - Ship the fix or budget change.
- Cancel the snooze on the alert once spend rate drops back below 2× normal.
Verify resolved
Section titled “Verify resolved”- Burn-rate query drops back below 5× for 30 min
- Daily projected spend within configured budget
Escalate
Section titled “Escalate”- If you cannot identify the cause within 1 hour → ack the alert + open an incident channel
- If burn rate continues to climb → treat as full budget breach (see runbook-ai-provider-budget-breached)