Runbook — Upstream LLM provider degraded
One of our LLM providers (Anthropic, OpenAI, Gemini, Grok, Cohere, Voyage, OpenRouter, Apex) is showing probe failures or a published status-page incident. AIGateway already auto-falls-back; this runbook covers the cases where it doesn't.
| Field | Value |
|---|---|
| Severity | varies — P0 for critical-tier providers (Anthropic, OpenAI, Apex), P1 for others |
| Owner | @aphaiboon |
| Alert source | Watchtower — probe_success{job="llm-...-list", provider=...} == 0 for 3m OR probe_success{job="status-statuspage-io", service=...} == 0 for 5m |
| Estimated time | 5–20 min |
| Required access | Provider status pages, Railway, CMMD AdminApp |
Symptom
Section titled “Symptom”Watchtower → LLM providers row shows one tile red. ntfy push: “Anthropic provider degraded”.
How CMMD handles provider failures (already)
Section titled “How CMMD handles provider failures (already)”server/services/ai-gateway/AIGateway.ts implements provider fallback via ai-gateway-fallback-ops-alert.ts. When the primary provider fails, the gateway retries on the next provider in the fallback chain. So most provider degradations are invisible to customers — they just get slower responses while the gateway falls back.
This runbook is for the cases where:
- The primary provider AND its fallbacks are all degraded simultaneously
- The provider is up but returning garbage (200 + empty content)
- Cost is spiking due to fallback retries
Diagnose
Section titled “Diagnose”-
Open Watchtower home → identify which provider is red.
-
Click into the corresponding status-page tile (Row 5) — does the provider itself acknowledge the incident?
-
Open CMMD AdminApp → Reporting → recent AI gateway fallback events for that provider.
-
Check
ai_agent_usage_logsfor the last 30 min — what’s the success rate by provider?SELECT provider, model, success, COUNT(*)FROM ai_agent_usage_logsWHERE created_at >= NOW() - INTERVAL '30 minutes'GROUP BY 1, 2, 3ORDER BY 1, 2;
Mitigate
Section titled “Mitigate”Single provider degraded, fallbacks healthy → no action
Section titled “Single provider degraded, fallbacks healthy → no action”AIGateway is already falling back. Acknowledge the alert. Watch for cost-burn (fallbacks usually use cheaper or different models).
Multiple providers degraded simultaneously
Section titled “Multiple providers degraded simultaneously”Check status.cloud.google.com (Google Cloud), status.cloudflare.com, etc — sometimes a backbone outage takes down multiple providers at once. If so, wait it out + post in #alerts.
Single provider, no public status-page acknowledgement, but our probes fail
Section titled “Single provider, no public status-page acknowledgement, but our probes fail”-
Spot-check with curl:
Terminal window curl -sS https://api.<provider>.com/v1/models \-H "Authorization: Bearer <test_key>" -
If our key is rate-limited / suspended → handle as separate auth issue.
-
If the response is malformed (200 but no model list) → file a ticket with the provider + rely on AIGateway fallback.
Cost spike from fallback retries
Section titled “Cost spike from fallback retries”If fallback to a more expensive provider is driving up cost, consider temporarily disabling that provider in CMMD’s AI provider config (Admin UI or env override) until upstream recovers.
Verify resolved
Section titled “Verify resolved”- Probe
probe_success{job="llm-..."}returns 1 for 5 minutes - Provider status-page tile back to green
ai_agent_usage_logssuccess rate above 95% for the last 15 min
Escalate
Section titled “Escalate”- Provider gives no ETA + business-critical feature degraded → notify customers via status.cmmd.ai
- Cost runaway from fallback retries → see runbook-ai-provider-daily-spend-burn
Related
Section titled “Related”- runbook-ai-provider-daily-spend-burn
server/services/ai-gateway/AIGateway.ts— fallback logicserver/services/ai-gateway/ai-gateway-fallback-ops-alert.ts— alerting on fallback events