Back to feed
Dev.to
Dev.to
7/12/2026
"The price table most AI cost tools multiply by has one automated test: jq empty

"The price table most AI cost tools multiply by has one automated test: jq empty

Short summary

The LiteLLM price table—used by most AI cost tools to compute spending—has only one automated test: jq empty, which merely verifies JSON parses. The author found structural flaws including grok-4.20 rows priced wrong while citing their own correction, no guard against input/output price transposition, no provenance on 69% of records, and silent deletion of historical prices that makes point-in-time billing impossible. They propose a provenance-first index with source URLs, effective dates, and validation dates, and maintain an open alternative covering 94 models.

  • LiteLLM's price table for ~2,783 models has no validation beyond JSON parseability, yet underpins ccusage, tokencost, ccost, and most AI cost tooling
  • Concrete errors found: grok-4.20 prices contradict their own cited source, no transposition guard, 69% of records lack provenance, historical prices are overwritten with no point-in-time recovery
  • Author maintains an open provenance-first alternative index (ai-price-index) with source URLs, effective dates, and validation dates for 94 models

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more