Repository navigation
fix(usage): price GPT-6 Sol/Luna, Opus 5.5 and Fable 5.1, and correct GPT-5.6 rates - #22350
Conversation
… GPT-5.6 rates gpt-6-sol and gpt-6-luna had no pricing entry, so their tokens were left out of the Codex cost total. claude-opus-5-5 and claude-fable-5-1 matched their major's pattern and were billed at Opus 5 ($5/$25) and Fable 5 ($1 cache read) rates. The GPT-5.6 Sol/Terra/Luna rates no longer matched OpenAI's published pricing (Luna was 5x high). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…int-release matching gpt-5.2-pro matched the gpt-5.2 prefix and billed at $1.75/$14 instead of its $21/$168. Codex's `max` and `ultra` reasoning tiers in parenthesized form left the model unpriced. The new fable-5-1/opus-5-5 patterns also accepted a trailing letter, so `claude-fable-5-1m` read as Fable 5.1. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- GPT-6 Sol/Luna priced — new
MODEL_PRICINGentries incodex-model-pricing.tsforgpt-6-solandgpt-6-lunawith their long-context tiers, plus exact/prefix name matching after thegpt-6-astrabranch. - GPT-5.6 rates corrected —
gpt-5.6-sol$4/$20,gpt-5.6-terra$2/$12,gpt-5.6-luna$0.20/$1.20, long-context tiers adjusted proportionally; existing store tests re-pinned to the resulting totals. - Claude point releases — new
claude-opus-5-5andclaude-fable-5-1entries, with point-release regexes placed before the/opus-5/and/fable-5/majors becausefable-5(?:$|[^0-9])also matchesfable-5-1(the-satisfies[^0-9]).claude-opus-5-50still correctly resolves to Opus 5. - Tests — new cases pin the point-release prices, the unaffected sibling (
claude-fable-5cache read$1), the version boundary (claude-opus-5-50), the GPT-6 Sol/Luna totals across the 272K long-context threshold, reasoning-suffix normalization, and thathasUnpricedModelsstaysfalsefor the new entries.
I traced the matching order, verified every token-bucket total against the store's accounting (cached input excluded from the full-price input bucket; one 272K allowance), and confirmed the new/changed rates against the published OpenAI and Anthropic pricing pages — all match, including Sol's promotional rate and the derived 1.25x/2x cache-write multipliers. The open items noted in the description (Opus 5.5 cache-write rates derived from multipliers, GPT-6 long-context threshold, claude-mythos-5-1 left out of scope) are appropriately documented and not defects.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta since the previous pullfrog review of a92cca6)
gpt-5.2-propriced — newMODEL_PRICINGentry21/21/168with no long-context tier; the match branch is placed before the genericgpt-5.2-prefix, so it resolves to Pro instead of basegpt-5.2(the new test's6.3result would be~0.446at the old rate, so it genuinely pins the precedence).(max)/(ultra)reasoning tiers accepted — a separatePARENTHESIZED_REASONING_TIERSlist extends the parenthesized forms without touching the dash-suffix list, sogpt-5.1-codex-maxis not stripped down togpt-5.1-codex. The new test exercisesgpt-6-sol(ultra)andgpt-5.6-luna(max).- Point-release matching tightened — the trailing guard on the Fable 5.1 / Opus 5.5 regexes is now
[^0-9a-z], soclaude-fable-5-1mfalls back to Fable 5 (asserted as$1cache read), whileclaude-opus-5.5[1m]andclaude-opus-5-5-thinkingstill match the point releases.
I traced the new match branches against their neighbours, re-checked the bucket math for the three new test rows, and confirmed gpt-5.2-pro's input/output rates against OpenAI's published page. The cachedInput: 21 value is not a published number, but it is the same no-discount encoding already used by gpt-5.4-pro / gpt-5.5-pro, so it is consistent with the table rather than a divergence. The tighted [^0-9a-z] guard is a documented judgment call and is covered by a test that fails against the previous code.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughClaude pricing now includes Opus 5.5 and Fable 5.1, with matching model-name normalization and cost tests. Codex pricing adds GPT-5.2 Pro and GPT-6 Sol and Luna, and changes GPT-5.6 rates. Codex normalization and tests also cover the added models and parenthesized reasoning tiers. Priority: ➖ Normal Merge Risk: 🟡 Moderate · up to Long-context usage can show incorrect cost estimates. Preserve request-level pricing information and correct the estimates before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 9181a576-b998-40a7-b632-82b7f1b9a93e
📒 Files selected for processing (4)
src/main/claude-usage/claude-model-pricing.test.tssrc/main/claude-usage/claude-model-pricing.tssrc/main/codex-usage/codex-model-pricing.tssrc/main/codex-usage/store-model-pricing.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.
| inputTiers: [{ threshold: LONG_CONTEXT_THRESHOLD_TOKENS, price: 8 }], | ||
| cachedInputTiers: [{ threshold: LONG_CONTEXT_THRESHOLD_TOKENS, price: 0.8 }], | ||
| outputTiers: [{ threshold: LONG_CONTEXT_THRESHOLD_TOKENS, price: 30 }] |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,235p' src/main/codex-usage/codex-model-pricing.ts
sed -n '1,170p' src/main/codex-usage/codex-usage-cost-estimate.ts
sed -n '95,170p' src/main/codex-usage/store-model-pricing.test.ts
sed -n '260,300p' src/main/codex-usage/store-model-pricing.test.tsRepository: stablyai/orca
Length of output: 14039
🌐 Web query:
site:developers.openai.com/api/docs/models/gpt-5.6-terra long context 272K input tokens full request pricing
💡 Result:
<source_evidence>
Citations:
🏁 Script executed:
rg -n "dailyAggregates|inputTokens|cachedInputTokens|estimateCostUsd|eventCount" src/main/codex-usage --glob '*.ts'Repository: stablyai/orca
Length of output: 36359
🌐 Web query:
site:developers.openai.com/api/docs/models GPT-5.6 Sol GPT-6 long context prompts 272K cached input full request pricing
💡 Result:
<source_evidence>
Citations:
- 1: https://developers.openai.com/api/docs/models
- 2: https://developers.openai.com/api/docs/models/all
- 3: https://developers.openai.com/api/docs/models/gpt-6-astra
- 4: https://developers.openai.com/api/docs/models/gpt-5.6-sol
- 5: https://developers.openai.com/api/docs/models/gpt-5.6-terra
- 6: https://developers.openai.com/api/docs/models/gpt-5.6-luna
- 7: https://developers.openai.com/api/docs/models/gpt-5.4
- 8: https://developers.openai.com/api/docs/models/gpt-5.5
- 9: https://developers.openai.com/api/docs/models/gpt-6-luna
🏁 Script executed:
sed -n '25,75p' src/main/codex-usage/types.ts; sed -n '105,175p' src/main/codex-usage/codex-usage-record-parser.ts; rg -n -A35 -B8 "mergeDailyAggregates|inputTiers|272_000|LONG_CONTEXT_THRESHOLD" src/main/codex-usage --glob '*.ts'; sed -n '350,495p' src/main/codex-usage/store-model-pricing.test.tsRepository: stablyai/orca
Length of output: 31677
🌐 Web query:
site:developers.openai.com/api/docs/pricing "272K" "cached input" full request GPT-5.6 GPT-6
💡 Result:
<source_evidence>
Citations:
Apply the 272K rule per request, before aggregation.
OpenAI’s GPT-5.6 model pages state that prompts above 272K input tokens use long-context rates for the full request. The pricing table lists separate long-context rates for input, cached input, and output. estimateCostUsd instead applies the threshold separately to aggregate uncached input, cached input, and output. A 300K-input request split into 150K cached and 150K uncached tokens, with 100K output tokens, therefore receives only short-context rates because each bucket is below 272K.
Daily breakdowns retain summed token counts, not request input sizes. Extend the usage data to retain request-level input sizes, calculate each request’s cost before aggregation, and update the fixtures to distinguish one long request from multiple short requests. The 2M-input fixture’s $34.8832 is the current aggregate-tier result; $38.80 assumes those totals are one request, but GPT-5.6’s documented 1.05M context window rules that out.
… GPT-5.6 rates (stablyai#22350) * fix(usage): price GPT-6 Sol/Luna, Opus 5.5 and Fable 5.1, and correct GPT-5.6 rates gpt-6-sol and gpt-6-luna had no pricing entry, so their tokens were left out of the Codex cost total. claude-opus-5-5 and claude-fable-5-1 matched their major's pattern and were billed at Opus 5 ($5/$25) and Fable 5 ($1 cache read) rates. The GPT-5.6 Sol/Terra/Luna rates no longer matched OpenAI's published pricing (Luna was 5x high). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(usage): price gpt-5.2-pro, accept (max)/(ultra) tiers, tighten point-release matching gpt-5.2-pro matched the gpt-5.2 prefix and billed at $1.75/$14 instead of its $21/$168. Codex's `max` and `ultra` reasoning tiers in parenthesized form left the model unpriced. The new fable-5-1/opus-5-5 patterns also accepted a trailing letter, so `claude-fable-5-1m` read as Fable 5.1. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit e16d9ca)

ELI5
Settings → Stats & Usage estimates what your Codex and Claude usage would cost. It looks up each model in a price list. The models released this week were either missing from that list or matched to the wrong entry, so their costs were left out or overstated. Some older GPT-5.6 prices were also out of date.
What Changed
gpt-6-solgpt-6-lunaclaude-opus-5-5claude-fable-5-1gpt-5.6-sol/-terra/-lunagpt-5.2-progpt-5.2prefix and billed at $1.75/$14(max)/(ultra)reasoning tiersgpt-6-sol(ultra)was unpriced-max, which would turngpt-5.1-codex-maxintogpt-5.1-codexHow it works: new entries in
MODEL_PRICINGincodex-model-pricing.tsandclaude-model-pricing.ts, plus name matching for each one. The Claude point releases are checked before their major version's pattern, because/opus-5(?:$|[^0-9])/also matchesopus-5-5.Why
Prices come from OpenAI's API pricing page and Anthropic's published model pricing. The approach is the same one #22073 used for GPT-6 Astra. The GPT-5.6 Sol price is OpenAI's promotional rate, listed through at least 2026-11-21, and a comment on that entry says so.
Uncertain inputs:
claude-mythos-5-1is not priced before or after this PR, and is left out of scope.Linked Issue
None. This covers the 2026-09-22 model launches.
Visual Proof
N/A. Only cost numbers from the pricing table change; no layout or interaction changes.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Added tests for GPT-6 Sol and Luna pricing, including names with a reasoning-effort suffix. The GPT-5.6 tests now check the new rates.
Added tests that
claude-opus-5-5,claude-opus-5.5[1m]andclaude-fable-5-1get their own prices, and thatclaude-opus-5-50still falls back to Opus 5.Added tests for
gpt-5.2-pro, the(ultra)and(max)forms, andclaude-fable-5-1m. Both new tests fail against the old code.vitestoversrc/main/claude-usage,src/main/codex-usageandsrc/renderer/src/components/stats: 167/167 passed.pnpm tc:node,oxlint,oxfmt --checkandcheck:code-quality:changedalso passed.AI Disclosure
Written with Claude Opus 5.5.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
The pricing tables run in the main process and read local and remote session logs the same way, so SSH, folder workspaces and each platform behave the same.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)