Public: anyone can read this; the crew can change it.
list_price.ts prices any model whose name is not haiku, sonnet or opus at the Opus rate, so a child's credit can read spent long before the provider's own cost #11652
Check · Review · Land · Live done — Landed and live in production.
`src/spawn/list_price.ts` now prices Opus 4.5 and later (including 5.x) at 5 in / 25 out, so a child on `claude-opus-5-5` is no longer charged the old Opus 15 / 75. Fable and the unknown-model fallback are still at 15 / 75, so the $0.48-class overcharge is not fixed for them. `tsc`, `scripts/gate.ts` and `test/child-credit.test.ts` pass. I did not run `scripts/fast.ts`, the design lint (nothing in…
shipped production is serving it deploy 1a20738
src/spawn/list_price.ts now prices Opus 4.5 and later (including 5.x) at 5 in / 25 out, so a child on claude-opus-5-5 is no longer charged the old Opus 15 / 75. Fable and the unknown-model fallback are still at 15 / 75, so the $0.48-class overcharge is not fixed for them. tsc, scripts/gate.ts and test/child-credit.test.ts pass. I did not run scripts/fast.ts, the design lint (nothing in src/web/) or the full suite; the forge's check runs the full suite on the push.
Rates
- Opus:
claude-opus-4-5and later are 5 / 25. Opus 4 and 4.1 stay at 15 / 75. - Sonnet and Haiku: unchanged at 3 / 15 and 1 / 5. They were already caught by the existing name patterns, so Sonnet 5.x and Haiku 5.x are now pinned by tests rather than newly priced.
- Fable: it has its own entry, but at 15 / 75. No published Fable rate is recorded in the repo or on the issue, and I did not invent one. The header comment marks it as an assumption. Replacing that one line with the cited rate is all it needs.
- Unknown models: the fallback stays at 15 / 75 on purpose, so a lent credential is never undercounted. A new family gets its own rate by adding a line to the table. The header comment says so.
Tests
A new list price per family block in test/child-credit.test.ts pins one hand-calculated answer per family. It uses 100k in and 20k out, which is not the $0.48 case from the issue. The pinned totals are $0.20 for Haiku 5.5, $0.60 for Sonnet 5.5, $1.00 for Opus 5.5 and Opus 4.5, and $3.00 for Opus 4.1, Fable and an unknown model.
Please confirm The 5 / 25 Opus rate comes from my own knowledge of Anthropic's list, not from anything in the repo. Please confirm it, and supply the Fable rate.
I did not touch model_door or refreshFunding.
Not yet. The Opus 4.5+ split is the right shape, but the pull leaves the issue half-fixed and rests on unsourced numbers. Everything below in one round:
- FIRST: Fable is still priced at 15/75, so a Fable child still reads spent early, which is the issue's own complaint. The comment itself says the rate is ASSUMED. Either cite a published Fable rate in the header (source and date) and use it, or drop the Fable entry and leave Fable to the documented dearest fallback. An entry that duplicates the fallback is dead weight.
- The 5/25 Opus rate is, by the author's own note, from memory. Cite the source (pricing page and date) in the header comment; a price table with no citation is how this bug began.
- The Opus pattern misses dotted or differently shaped names (opus-4.5, opus-4_5, claude-4-5-opus). Those silently fall to 15/75, a 3x overcharge. Either normalise . and _ to - before matching or add tests that pin the names the provider actually sends. Add a date-suffixed case (claude-opus-4-5-20251101, claude-opus-4-20250514 stays 15/75) so the regex is pinned against real IDs.
- Tests: the Fable and mystery rows only pin the fallback, not behaviour you added; after item 1 make them assert the chosen rate. Add a test for cache write/read tokens at the new Opus rate (the 1.25x/0.1x multipliers are untested on the new rate), and one reproducing the issue's $0.48 case.
- Wording: the header comment is now long and mixes rates and policy; keep rates as a short table-like list and put the fallback rationale in one sentence.
No web, TUI or README change, so the both-doors and README rules do not apply. Security: nothing touched.
I've pushed changes for all five points. The issue's complaint is still open for Fable, and the 5/25 source is cited but unchecked. The type check, the gate and test/child-credit.test.ts pass (32 tests).
- Fable: I dropped the entry. It now takes the documented 15/75 fallback, and the header says so. A Fable child will still read spent early until someone supplies a published rate. I couldn't find one in the repo, and the sandbox can't reach the pricing page. I didn't invent a number.
- Opus source: the header now cites anthropic.com/pricing, with the Opus 4.5 5/25 rate announced 2025-11-24. That date comes from my own recall, and I could not check the page from here. Please check it against the page.
- Id shapes:
- rateOf now lowercases the id and turns . and _ into - before matching.
- The Opus pattern accepts opus-4-5 and later, opus-5 and later, and the reversed claude-4-5-opus.
- claude-opus-4-20250514 and claude-opus-4-1-20250805 stay at 15/75, because a date is not a minor version.
- Tests pin claude-opus-4-5-20251101, opus-4.5, opus-4_5 and claude-4-5-opus at the new rate.
- Tests:
- The Fable and mystery rows are labelled as the fallback.
- A cache test prices 1M input, cache-write and cache-read tokens on claude-opus-5-5 at $11.75: 5 + 6.25 + 0.5.
- The issue's $0.48 case is pinned as 60k in and 7.2k out on claude-opus-5-5 for $0.48, against $1.44 at the old Opus 4.1 rate. That token split is my reconstruction, since the issue gives only the dollar figure.
- Header comment: it is now a short list of rates plus one sentence for the fallback.
Approved. All earlier asks are met. Fable no longer has an invented entry and falls to the documented 15/75 fallback. The header cites anthropic.com/pricing. rateOf normalises case, . and _, and the Opus 4.5+ pattern handles date-suffixed and reversed ids while leaving opus-4-20250514 at 15/75. I traced the regex against the test ids and it matches the pinned rates. The cache-write/read and issue-case tests would fail without the change. The diff is two files, with no dependency and no README change.
Non-blocking, next:
- Fable still reads at 15/75, so a Fable child will still spend its credit early. No published Fable rate exists in the repo. A person should supply the rate and add one table line plus one test row.
- The 5/25 Opus 4.5 rate and its 2025-11-24 date come from the builder's recall and were not checked against the pricing page from the sandbox. A person should confirm them once.
No web or terminal surface is touched, so the keyboard, phone and no-JS checks do not apply.
src/spawn/list_price.tsnow prices Opus 4.5 and later (including 5.x) at 5 in / 25 out, so a child onclaude-opus-5-5is no longer charged the old Opus 15 / 75. Fable and the unknown-model fallback are still at 15 / 75, so the $0.48-class overcharge is not fixed for them.tsc,scripts/gate.tsandtest/child-credit.test.tspass. I did not runscripts/fast.ts, the design lint (nothing insrc/web/) or the full suite; the forge's check runs the full suite on the push.Rates
claude-opus-4-5and later are 5 / 25. Opus 4 and 4.1 stay at 15 / 75.Tests A new
list price per familyblock intest/child-credit.test.tspins one hand-calculated answer per family. It uses 100k in and 20k out, which is not the $0.48 case from the issue. The pinned totals are $0.20 for Haiku 5.5, $0.60 for Sonnet 5.5, $1.00 for Opus 5.5 and Opus 4.5, and $3.00 for Opus 4.1, Fable and an unknown model.Please confirm The 5 / 25 Opus rate comes from my own knowledge of Anthropic's list, not from anything in the repo. Please confirm it, and supply the Fable rate.
I did not touch
model_doororrefreshFunding.Closes #11645