feat: add Claude Fable 5 pricing#136
Closed
iliaal wants to merge 1 commit into
Closed
Conversation
Fable 5 is a new tier above Opus, priced at $10/MTok input and $50/MTok output (cache read $1.00, cache write $12.50). Without an entry it matched no pricing keyword, so calc_cost billed it at $0 and the dashboard dropped it from billable totals. - Add claude-fable-5 to the PRICING tables in cli.py and dashboard.py, plus a "fable" substring fallback for date-suffixed ids - Include fable in the dashboard billable filter and model sort, and in the scanner's session primary-model priority (above opus) - Update the README pricing table and keyword list - Add tests for the pricing entry, fallback, and priority ordering
Owner
|
Thanks @iliaal, and sorry for the duplicated effort. We added Claude Fable 5 (and Mythos 5) pricing independently in v1.2.5 (released today, 2026-06-15): both models are now explicit entries in Since that already shipped to |
phuryn
added a commit
that referenced
this pull request
Jun 15, 2026
The Rescan button's POST /api/rescan handler unlink()ed usage.db and rebuilt from the JSONL transcripts on disk. That is data-loss by design: Claude Code prunes old transcripts on a rolling basis (cleanupPeriodDays), and usage.db — being append-only — is the only durable record of history older than the on-disk retention window. Clicking Rescan once wiped every day older than that window, with no warning and no backup. Fix: /api/rescan now runs an incremental scanner.scan() WITHOUT unlinking the DB (scan dedupes via the message_id index and only adds new turns, so history is preserved). Unlike PR #138 we keep the button — it's the only in-session way to ingest new turns, since auto-refresh only re-reads /api/data. Reworded its tooltip to describe the additive behaviour. Tests: - test_api_rescan_is_non_destructive: seeds history with no on-disk JSONL, posts /api/rescan, asserts the rows survive (fails under the old wipe). - test_fable_and_mythos_have_explicit_entries / _date_suffix / substring: lock in Fable/Mythos pricing (#136/#137 had no regression guard). Co-Authored-By: OtoGodfrey <OtoGodfrey@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 <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.
What
Adds pricing for Claude Fable 5, the new tier above Opus.
Input and output rates are from the Fable 5 announcement. Cache rates follow the same multipliers every other row uses (read = input × 0.1, write = input × 1.25).
Why
Fable usage matches none of the existing pricing keywords, so
get_pricingreturnsNoneandcalc_costbills it at $0. The dashboard also drops it from billable totals. Tokens show up, but cost reads as $0 /n/a.Changes
cli.py/dashboard.py: aclaude-fable-5row in both PRICING tables, plus afablesubstring fallback so date-suffixed ids (e.g.claude-fable-5-20260601) resolve. The two tables stay in sync, which the existing sync test enforces.dashboard.py: fable now counts inisBillable, resolves ingetPricing, and sorts first inmodelPriorityas the top tier.scanner.py:MODEL_PRIORITYgainsfable: 4, so a session's primary model picks Fable over a subagent's Opus or Sonnet turn.README.md: pricing table row and the included-keywords sentence.test_cli.py, priority ordering intest_scanner.py. Suite is 107 passing.Same shape as the Opus 4.8 pricing PR, with the added
scanner.pypriority bump that a new model family needs.