chore(v1.10): price-table + model-alias refresh - #74
Merged
Merged
Conversation
Prices verified against platform.claude.com pricing docs on 2026-06-10: Opus 4.5+ repriced to $5/$25 (was billed at the 4.0/4.1-era $15/$75 via the bare claude-opus-4 prefix); Haiku 4.5 corrected to $1/$5 (table had the Haiku 3.5 rates). Per-version Opus entries take longest-prefix precedence; the bare prefix keeps legacy rates for 4.0/4.1 dated IDs. latest alias rolls claude-opus-4-7 -> claude-opus-4-8. Deprecation table seeded from Anthropic deprecation schedule (opus-4-1, opus/sonnet 4-20250514, claude-3-haiku). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item 2 of the v1.10 preflight (
docs/planning/v1.10-charter.md). Prices verified against the live Anthropic pricing docs (platform.claude.com/docs/en/about-claude/pricing) on 2026-06-10 — not from memory.What changed
usage.py:_PRICES— two real errors fixed:claude-opus-4prefix entry carried $15/$75 (Opus 4.0/4.1-era rates). Opus 4.5 through 4.8 actually bill at $5/$25 (cache read $0.50, 5m cache write $6.25). The table now has per-version entries forclaude-opus-4-5/-6/-7/-8at the new rates; longest-prefix matching keeps the bareclaude-opus-4entry as the $15/$75 fallback for 4.0/4.1 dated IDs (e.g.claude-opus-4-20250514). Net effect: anything billed atlatestwas being over-estimated 3×.claude-haiku-4carried $0.80/$4.00 — those are Haiku 3.5 rates. Haiku 4.5 is $1/$5 (read $0.10, write $1.25).models.py—latestrollsclaude-opus-4-7→claude-opus-4-8(the current Opus; same API surface as 4.7)._DEPRECATED_MODELSseeded from Anthropic's deprecation schedule:claude-opus-4-1(retires 2026-08-05),claude-opus-4-20250514/claude-sonnet-4-20250514(retire 2026-06-15),claude-3-haiku-20240307(retired).fast/legacyunchanged; no docs/config changes needed — they reference aliases only, and the realconfig.jsonpinsclaude-sonnet-4-6explicitly so nothing changes behavior today.The campaign model decision (James picks)
Projected cost for one full sweep of the four measured AI steps over ~5,000 books, from
usage.jsonlhistory (228 calls, all Sonnet 4.6) — per-call averages divided by each step's default batch size, priced at verified rates. The Opus column includes a +30% token adjustment for the 4.7+ tokenizer (docs say "up to 35% more tokens").Per-book, all four steps: Opus $0.042 · Sonnet $0.019 · Haiku $0.006.
Caveats, stated honestly:
enrich-identifiersAI path (never run — no usage history; applies only to a subset of books) and thetags-cleanuppass (batches of 150, few calls — small). Both add to the total but not materially against the model deltas.My read: comments-enrich is ~2/3 of total cost at any model, and the Opus-vs-Sonnet delta on the whole campaign is ~$110. The decision is recorded when you pick — including per-step mixes (e.g. Sonnet everywhere, Opus for comments only ≈ $170).
Verification
python -m pytest -q— 639 passed (3 price-pinned tests updated to the verified rates, including a new assertion that legacy Opus 4.0 IDs still resolve to $15).clean-titles --limit 3 --dry-runshows a dollar estimate (≈ $0.04, cold-cache write dominated) with the refreshed table. A smoke on the chosen campaign model happens after your pick.🤖 Generated with Claude Code