Skip to content

Commit b410236

Browse files
GordonBeemingclaudegitbutler-client
committed
fix: add Fable 5 to pricing table so it isn't dropped from daily cost
claude-fable-5 had no row in the daily-cost pricing table, so model_rate returned null and the select(model_rate(...) != null) filter silently dropped every Fable 5 usage record. A heavy Fable 5 day under-reported as roughly a quarter of the session cost. Added the Fable 5 bucket ($10/$50 per M tokens, cache derived 1.25x/2x/0.1x like every other row) ahead of the opus branches, and expanded the table comment to call out that a missing row drops records rather than erroring. Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: GitButler <gitbutler@gitbutler.com>
1 parent fa4e11b commit b410236

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

statusline.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ if [[ "$need_recompute" == "true" ]]; then
172172
fi
173173
if (( ${#jsonl_files[@]} > 0 )); then
174174
# Pricing table — USD per 1M tokens. Source: https://www.anthropic.com/pricing
175+
# Fable 5 ($10/$50) is the tier above Opus. Its id has no `opus` substring
176+
# so ordering vs. the opus branches doesn't matter for correctness, but it
177+
# sits first so the most-expensive tier is easy to spot. A missing fable
178+
# row silently drops every fable record from the daily total via the
179+
# `model_rate(...) != null` filter — exactly the bug that under-reported a
180+
# heavy Fable 5 day as ~1/4 of the session cost.
175181
# Opus 4.5+ is priced 1/3 of older Opus (4.1, 3) — Anthropic dropped the
176182
# rate for the newer models. The newer branch must be matched *before* the
177183
# generic `opus` fallback so it wins for `claude-opus-4-7-…` etc. Haiku
@@ -196,7 +202,8 @@ if [[ "$need_recompute" == "true" ]]; then
196202
jq_raw=$(jq -n -r --argjson lo "$day_lo" --argjson hi "$day_hi" '
197203
def model_rate($m):
198204
($m | ascii_downcase) as $lm
199-
| if ($lm | test("opus-4-[5-9]|opus-[5-9]")) then {i:5, o:25, cw5:6.25, cw1h:10, cr:0.50}
205+
| if ($lm | test("fable")) then {i:10, o:50, cw5:12.50, cw1h:20, cr:1.00}
206+
elif ($lm | test("opus-4-[5-9]|opus-[5-9]")) then {i:5, o:25, cw5:6.25, cw1h:10, cr:0.50}
200207
elif ($lm | test("opus")) then {i:15, o:75, cw5:18.75, cw1h:30, cr:1.50}
201208
elif ($lm | test("sonnet")) then {i:3, o:15, cw5:3.75, cw1h:6, cr:0.30}
202209
elif ($lm | test("haiku-4|haiku-[5-9]")) then {i:1, o:5, cw5:1.25, cw1h:2, cr:0.10}

0 commit comments

Comments
 (0)