Skip to content

fix: claude-sonnet-5 intro pricing 2/10 (0.39.20) - #17

Merged
pitimon merged 1 commit into
mainfrom
fix/16-sonnet5-intro-pricing
Jul 4, 2026
Merged

fix: claude-sonnet-5 intro pricing 2/10 (0.39.20)#17
pitimon merged 1 commit into
mainfrom
fix/16-sonnet5-intro-pricing

Conversation

@pitimon

@pitimon pitimon commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Dashboard overstated Claude Sonnet 5 cost by 50%: it billed the 3/15 sticker, but Anthropic's official intro price is 2/10 USD/MTok (cache_read 0.20, cache_write 2.50) through 2026-08-31. The bundled LiteLLM seed already carries 2/10, but a curated exact pin + 5 edge-patch tables forced 3/15.
  • Drop the curated exact claude-sonnet-5 pin (+ its now-dead fuzzy rule): the src path falls through to the seed's exact entry (matcher.js step 2) at 2/10 and auto-tracks LiteLLM's revert to 3/15 after the intro window — no manual edit needed for the runtime billing path.
  • Update the 5 dashboard/edge-patches MODEL_PRICING tables to 2/10 (edge patches don't read the seed). These are hardcoded → dated reminder added to curated-overrides.json _meta.sonnet5_intro_price_expiry (mirrors the existing deepseek expiry convention) so the post-2026-08-31 manual revert isn't forgotten.

Test plan

  • getModelPricing('claude-sonnet-5'){input:2, output:10, cache_read:0.2, cache_write:2.5} against the real bundled seed (not just fixture)
  • node --test test/pricing.test.js test/model-breakdown.test.js test/edge-patch-pricing-sync.test.js — 55/55 (new: sonnet-5 resolves 2/10, computeRowCost 3.725; edge-patch value assertion 2/10 across all 5 tables)
  • npx vitest run UsageOverview DataDetails — 7/7
  • validate:copy / validate:ui-hardcode / validate:guardrails — clean
  • Review gate: deep-reasoner APPROVE — resolution path traced (dropped fuzzy confirmed dead via matcher.js:155), tests confirmed to assert real values + catch a wrong re-pin, no secrets, no stray 0.39.19
  • After merge: publish 0.39.20 to npm + reinstall LaunchAgent (pending approval)

Known follow-up (tracked in-repo)

_meta.sonnet5_intro_price_expiry flags the 2026-08-31 cutover: src path self-reverts (reads seed), but the 5 edge patches must be reverted to 3/15 manually + seed re-vendored. Asymmetry is intentional (edge patches can't read the seed) and now documented.

Closes #16

Dashboard overstated Claude Sonnet 5 cost by 50%. Anthropic's official
intro price is 2/10 USD/MTok (cache_read 0.20, cache_write 2.50) through
2026-08-31; sticker is 3/15. The bundled LiteLLM seed already carries the
intro rate, but a curated exact pin + 5 edge-patch tables forced 3/15.

- Drop the curated exact `claude-sonnet-5` pin (+ its now-dead fuzzy rule):
  the src path falls through to the seed's exact entry (matcher step 2) at
  2/10 and will auto-track LiteLLM's revert to 3/15 after the intro window,
  no manual edit needed.
- Update the 5 dashboard/edge-patches MODEL_PRICING tables to 2/10 (edge
  patches don't read the seed). These are hardcoded and must be reverted
  manually after 2026-08-31 — dated reminder added to curated-overrides
  _meta.sonnet5_intro_price_expiry (mirrors the deepseek expiry convention).
- Regression tests: pricing.test.js asserts claude-sonnet-5 resolves to
  2/10 (computeRowCost 3.725, not 5.5875); edge-patch-pricing-sync asserts
  the parsed value equals 2/10/0.2/2.5 across all 5 tables.
- Version bump 0.39.19 -> 0.39.20 (source only; npm publish separate).

Verified: getModelPricing('claude-sonnet-5')=2/10 against real seed;
node --test 55/55, vitest 7/7, validators clean.

Closes #16
@pitimon
pitimon merged commit ebc41cd into main Jul 4, 2026
@pitimon
pitimon deleted the fix/16-sonnet5-intro-pricing branch July 4, 2026 00:49
pitimon pushed a commit that referenced this pull request Jul 4, 2026
prepublishOnly regenerated the LiteLLM seed during npm publish; commit so
the repo matches the published tarball (per npm-publish-checklist). Diff is
timestamp-only (_meta.generated_at); 2471 models unchanged, no rate changes.
claude-sonnet-5 stays at the intro 2/10 that PR #17 relies on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sonnet-5 cost overstated 50% during intro pricing window (pin 3/15 vs actual 2/10 until 2026-08-31)

1 participant