Skip to content

feat(models): reflect the 2026-07-30 Terra and Luna price cut - #232

Merged
mike1858 merged 1 commit into
Piebald-AI:mainfrom
NickAme03:pricing/terra-luna-price-cut
Aug 1, 2026
Merged

feat(models): reflect the 2026-07-30 Terra and Luna price cut#232
mike1858 merged 1 commit into
Piebald-AI:mainfrom
NickAme03:pricing/terra-luna-price-cut

Conversation

@NickAme03

@NickAme03 NickAme03 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Closes #227.

Terra goes from $2.50/$15.00 to $2.00/$12.00 per 1M input/output tokens, Luna from $1.00/$6.00 to $0.20/$1.20, effective 2026-07-30. Sol is unchanged. (CNBC, Axios)

The old rates move into dated_pricing with valid_until = 2026-07-30 instead of being overwritten. Overwriting re-costs everything recorded before the cut: a Luna session that actually cost $7.00 per 1M combined tokens gets reported at $1.40 on the next run. claude-sonnet-5 already uses this mechanism the same way.

Two tests cover the boundary. Usage on 2026-07-29 keeps the old price, usage on 2026-07-30 gets the new one, since valid_until is exclusive.

Cached-token rates here are derived, not quoted. OpenAI did not publish cached-input prices alongside the new rates. I applied the rule this registry already uses for the GPT-5.6 family, cache writes at 1.25x the uncached input rate and reads at one tenth of it, which reproduces the existing Terra and Luna entries exactly. If you have official numbers, use those instead of my derivation.

I ran the suite in my fork, since checks.yml does not run cargo test (#231). The runs below are on fork branches that add a temporary cargo test workflow. src/models.rs on those branches is byte-identical to this one; the only difference is that workflow file.

base, unmodified green
this branch's code green
new prices, dated overrides removed fails on gpt_5_6_terra_and_luna_keep_pre_cut_pricing_for_older_usage, left=2, right=2.5

The third row is why this uses dated entries rather than editing the numbers in place.

Summary by CodeRabbit

  • New Features

    • Added lower standard pricing for GPT-5.6 Terra and GPT-5.6 Luna, including cache read and write rates.
    • Preserved previous pricing through July 30, 2026, with date-based pricing behavior.
  • Tests

    • Added coverage confirming pricing before and on the pricing change date.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@NickAme03, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9adf30fc-e086-4e95-860a-8a639320f0ef

📥 Commits

Reviewing files that changed from the base of the PR and between 7c8b28e and 8a83710.

📒 Files selected for processing (1)
  • src/models.rs
📝 Walkthrough

Walkthrough

The change updates GPT-5.6 Terra and Luna pricing, adds cache rates, preserves prior rates before 2026-07-30, and tests both sides of the date boundary.

Changes

GPT-5.6 pricing

Layer / File(s) Summary
Dated pricing and validation
src/models.rs
Adds standard and cache pricing for gpt-5.6-terra and gpt-5.6-luna. Adds legacy-rate overrides before 2026-07-30. Tests pricing before and on the cutoff date.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit checks the rates today,
Terra and Luna cost less to pay.
Old rates remain before the date,
Tests confirm the boundary state.
The pricing burrow is up to date.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the GPT-5.6 Terra and Luna price cut and its effective date.
Linked Issues check ✅ Passed The changes implement issue #227 by updating Terra and Luna pricing and preserving historical rates across the 2026-07-30 boundary.
Out of Scope Changes check ✅ Passed The changes are limited to pricing registry updates and related expectations and tests for Terra and Luna.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/models.rs (1)

3063-3071: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Test historical cache-write pricing.

Line 3066 passes zero cache-creation tokens. The test does not validate the dated cache_write_per_1m values. src/analyzers/copilot_cli.rs:220-231 passes cache-creation tokens into this date-aware pricing path. Add a nonzero cache-write assertion for both models.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/models.rs` around lines 3063 - 3071, Update the historical pricing test
around calculate_cache_cost_for_service_tier_at to pass a nonzero cache-creation
token count and assert the resulting cache-write cost for both models. Preserve
the existing cache-read assertion and ensure the expectations exercise the
date-specific cache_write_per_1m values selected by before_cut.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/models.rs`:
- Around line 3063-3071: Update the historical pricing test around
calculate_cache_cost_for_service_tier_at to pass a nonzero cache-creation token
count and assert the resulting cache-write cost for both models. Preserve the
existing cache-read assertion and ensure the expectations exercise the
date-specific cache_write_per_1m values selected by before_cut.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a0ea80a-3650-4e47-8d03-b384af6b32e6

📥 Commits

Reviewing files that changed from the base of the PR and between f614099 and 0f13811.

📒 Files selected for processing (1)
  • src/models.rs

@NickAme03
NickAme03 force-pushed the pricing/terra-luna-price-cut branch from 0f13811 to 7c8b28e Compare August 1, 2026 19:52
OpenAI cut GPT-5.6 Luna by 80% and Terra by 20% on 2026-07-30. Terra goes
from $2.50/$15.00 to $2.00/$12.00 per 1M input/output tokens, Luna from
$1.00/$6.00 to $0.20/$1.20. Sol is unchanged.

The old rates move into `dated_pricing` with `valid_until = 2026-07-30`
rather than being overwritten. Without that, every session recorded before
the cut is re-costed at the new rates on the next run, and a Luna session
that actually cost $7.00 per 1M combined tokens is reported at $1.40. The
registry already models this, and `claude-sonnet-5` uses it the same way.

Cached-token rates are derived, not quoted: OpenAI did not publish separate
cached-input prices alongside the new rates. The derivation follows the rule
this registry already applies to the GPT-5.6 family, cache writes at 1.25x
the uncached input rate and cache reads at one tenth of it, which reproduces
the existing Terra and Luna entries exactly.

Two tests cover the boundary: usage on 2026-07-29 keeps the pre-cut price,
and usage on 2026-07-30 already gets the new one, since `valid_until` is
exclusive.
@NickAme03
NickAme03 force-pushed the pricing/terra-luna-price-cut branch from 7c8b28e to 8a83710 Compare August 1, 2026 19:56

@mike1858 mike1858 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I checked your cached pricing here. Your estimates are perfectly accurate.

@mike1858
mike1858 merged commit df257dd into Piebald-AI:main Aug 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reflect new GPT-5.6 Terra and Luna pricing

2 participants