Incident Report: Invalid model cost map on main
Contents · 4 sections
Incident Report: Invalid model cost map on main
LiteLLM incident report. Published 2026-02-10.
Date: January 27, 2026 Duration: ~20 minutes Severity: Low Status: Resolved
Summary
A malformed JSON entry in model_prices_and_context_window.json was merged to main (562f0a0). This caused LiteLLM to silently fall back to a stale local copy of the model cost map. Users on older package versions lost cost tracking for newer models only (e.g. azure/gpt-5.2). No LLM calls were blocked.
- LLM calls and proxy routing: No impact.
- Cost tracking: Impacted for newer models not present in the local backup. Older models were unaffected. The incident lasted ~20 minutes until the commit was reverted.
Background
The model cost map is not in the request path. It is used after the LLM response comes back, inside a try/catch, to calculate spend. A missing entry never blocks a call.
Both paths return a response to the caller. When the cost map lookup fails, the only difference is cost=0 on that request.
Root cause
LiteLLM fetches the model cost map from GitHub main at import time. If the fetch fails, it falls back to a local backup bundled with the package. Before this incident, the fallback was completely silent — no warning was logged.
A contributor PR introduced an extra { bracket, producing invalid JSON. The remote fetch failed with JSONDecodeError, triggering the silent fallback. Users on older package versions had backup files missing newer models.
Timeline:
- Malformed JSON merged to
main - LiteLLM installations fall back to local backup on next import
- Users report
"This model isn't mapped yet"for newer models - Bad commit identified and reverted (~20 minutes)
Remediation
Tags
Only on this entry: json