fix(token-usage): decide the long-context tier once per priced entry
price_entry computed is_long_context for the recorded column while the per-shape cost formulas each recomputed it to select rates — consistent only by coincidence of calling the same function twice. The decision is now made once and threaded into the cost, so the recorded flag (which the wire's long-context splits are built from) can never diverge from the tier the cost actually billed at. Cost/db tests also move from claude-sonnet-4-20250514 to a model id the embedded snapshot actually carries: models.dev dropped first-party claude-sonnet-4, and the tests had been passing through the family fallback's (formerly leaked, now neutralized) tier data. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
S
Sasha Varlamov committed
f36b5511622a3e877b0307daa58fa0c236d4092d
Parent: b107a06