Summary
LLM price tables hardcoded into a codebase (per-model input/output/reasoning/cache-read rates) silently drift away from vendor-published pricing. The source documents two independent confirmations that yoyo's src/format/cost.rs misprices deepseek-v4-flash, proves the defect from the repo's own files plus external sources, and records prior art (yoagent's tests/price_audit.rs) showing that such drifts can survive 18 releases undetected. The design rule that emerges: a price-audit failure is a drift alarm that sends a human to the vendor page — never an auto-patch.
Key Points
- The defect is repo-provable. yoyo's
.yoyo.tomlcomment (2026-09-15) states thatdeepseek-v4-flashis a legacy name served by DeepSeek-V4.1-Flash at the Flash price — i.e. it should be priced by the:200arm. Butcost.rs:187matchesv4-flashfirst (the table arms are substring tests) and prices it at(0.55, 0.0, 0.0, 2.19), a ~3.7× overstatement of the Flash input rate. The config comment and the pricing arm contradict each other without consulting any live page. - Two external sources agree with the comment, not the arm. DeepSeek's own pricing page and
models.dev/api.jsonboth placedeepseek-v4-flashat the Flash rate. So:187is stale. - The test pin is vacuous.
cost.rs:1713(a near-miss guard) asserts the wrong number byte-identically. A test that agrees with the table it guards cannot detect the table drifting from the vendor. - Drift can be long-lived and expensive.
yoagentshippedclaude_sonnet_5at Sonnet 4.6 rates (3/15 vs published 2/10) from v0.9.0 through v0.16.5 — 18 releases with a 50% overstatement on everycost_usd— found by a human asking, not by a mechanism. - Cache-hit pricing is easy to get dangerously wrong. Cache-read rates are often an order of magnitude below cache-miss (DeepSeek: 0.003 vs 0.15 per 1M). Leaving at is not "conservative cheapness" — it is a wrong number that can report a bill than reality.