Update GPT-5.6 Terra and Luna pricing - #2521
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 3, 2026, 6:39 PM ET / 22:39 UTC. ClawSweeper reviewWhat this changesUpdates bundled GPT-5.6 Terra and Luna fallback pricing, retains pre-July-30 rates for historical usage, and passes usage dates through Codex cost calculations. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep open: current main still has the older Terra and Luna fallback rates, while this PR updates them and preserves historical totals. The patch has no concrete correctness finding, but it is currently conflict-marked and lacks after-fix real-behavior proof. Priority: P2 Review scores
Verification
How this fits togetherCodexBar scans local Codex usage records and applies bundled fallback rates when a model catalog is unavailable. This change feeds each usage row’s date into that calculation so displayed historical cost totals use the rate effective on that day. flowchart LR
A[Local Codex usage records] --> B[Daily usage rows]
B --> C[UTC pricing date]
C --> D[Historical or current fallback rate]
D --> E[Cost calculation]
E --> F[Usage totals in CodexBar]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land a rebased branch only after a redacted real scan demonstrates pre-cutover and current Terra/Luna records receiving their respective rates. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main contains the former bundled values and the branch deterministically selects old or new tuples from each row date. No after-fix real scan has been supplied. Is this the best way to solve the issue? Yes, conditionally: date-aware fallback history with UTC day parsing is a narrow way to avoid retroactively changing prior totals. It should be rebased and demonstrated against a real scanned record before merge. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 47e1d0426236. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 29a46c48a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| inputCostPerToken: 2e-6, | ||
| outputCostPerToken: 1.2e-5, | ||
| cacheReadInputCostPerToken: 2e-7, |
There was a problem hiding this comment.
Preserve old rates before the July 30 cutover
For bundled-fallback pricing of Terra or Luna usage dated before 2026-07-30, these replacements retroactively apply the new rates. codexCostUSD accepts no pricing date, and callers such as codexRowsCostUSD and codexRowCostBreakdown do not pass row.day; the changed pricing fingerprint also forces cached history to be rescanned. Consequently, pre-cutover Terra costs are reduced by 20% and Luna costs by 80%, corrupting historical totals. Keep the old and new tuples behind an effective-date cutoff and price each row using its recorded date.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae55da1b64
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| inputTokens: row.input, | ||
| cachedInputTokens: row.cached, | ||
| outputTokens: row.output, | ||
| pricingDate: CostUsageDateParser.parse(row.day), |
There was a problem hiding this comment.
Parse pricing cutover days in a fixed time zone
When the process runs east of UTC (for example, Asia/Tokyo), CostUsageDateParser interprets 2026-07-30 as local midnight, which is still before the UTC cutoff at epoch 1_785_369_600. As a result, every Terra/Luna row bucketed on July 30 is charged the old rates (including Luna at 5× the new price), and the added row-pricing test changes behavior with the runner's time zone. Compare the day key directly or parse it in a fixed cutoff time zone instead of using TimeZone.current.
Useful? React with 👍 / 👎.
|
Thank you for catching the July 30 price cut so quickly! The Terra/Luna rate reduction has since landed on |
OpenAI reduced GPT-5.6 Terra and Luna API pricing effective July 30. This updates CodexBar's bundled fallback rates for standard, cache, and long-context usage while preserving Sol pricing, plus refreshes focused coverage and the generated pricing fingerprint.
Source: OpenAI: Advancing the price-performance frontier with GPT-5.6
Validation:
swift test --filter CostUsagePricingTestsmake checkmake test(758 selections)