Skip to content

Update GPT-5.6 Terra and Luna pricing - #2521

Open
iam-brain wants to merge 2 commits into
steipete:mainfrom
iam-brain:iam-brain/update-gpt56-pricing
Open

Update GPT-5.6 Terra and Luna pricing#2521
iam-brain wants to merge 2 commits into
steipete:mainfrom
iam-brain:iam-brain/update-gpt56-pricing

Conversation

@iam-brain

Copy link
Copy Markdown
Contributor

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 CostUsagePricingTests
  • make check
  • make test (758 selections)

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed July 30, 2026, 6:36 PM ET / 22:36 UTC.

ClawSweeper review

What this changes

This PR updates CodexBar’s bundled GPT-5.6 Terra and Luna fallback prices, refreshes the generated pricing fingerprint, and updates focused cost-calculation expectations.

Merge readiness

Blocked until real behavior proof from a real setup is added - 5 items remain

Keep this PR open. The standard Terra and Luna prices match the PR-linked OpenAI announcement, but the patch also changes cache and long-context billing rates without an authoritative source, despite the existing pricing table documenting those values as provider contracts rather than derivations. It also needs real after-fix runtime proof before merge.

Priority: P2
Reviewed head: 29a46c48a3e9960b5d8fed0a6db92f46eb838b6c

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The PR is focused and its standard prices match the cited announcement, but unverified non-standard billing changes and missing real behavior proof keep it from merge-ready quality.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR body lists focused tests and checks but includes no attached after-fix runtime output showing a real bundled-fallback estimate; add redacted terminal or app proof, with private account or endpoint data removed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body lists focused tests and checks but includes no attached after-fix runtime output showing a real bundled-fallback estimate; add redacted terminal or app proof, with private account or endpoint data removed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Bundled-rate contract boundary: The current table explicitly states that cache-write, long-context, and priority values are provider contracts and must not be inferred from standard pricing; the PR changes cache and long-context values while its cited announcement states only the new standard input/output prices.
Changed non-standard rate fields: The branch changes Terra and Luna cache-read, cache-write, and above-threshold rates alongside standard input/output prices, but the linked OpenAI announcement provides only the four standard per-million-token figures.
Focused tests inherit the same assumptions: The updated tests assert the derived standard and long-context values, so they protect internal consistency but do not establish that the changed non-standard provider rates are authoritative.
Findings 1 actionable finding [P2] Verify non-standard billing rates from a provider contract
Security None None.

How this fits together

CodexBar turns model token counts into USD usage estimates through its CostUsage pricing table. It prefers catalog data when available and otherwise uses the bundled rate tuples changed here, so incorrect fallback rates directly affect displayed cost estimates.

flowchart LR
    A[Model token counts] --> B[Catalog pricing lookup]
    B --> C{Catalog rate available?}
    C -->|Yes| D[Catalog-backed cost estimate]
    C -->|No| E[Bundled GPT-5.6 rate table]
    E --> F[Token cost calculation]
    D --> G[Displayed USD usage]
    F --> G[Displayed USD usage]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body lists focused tests and checks but includes no attached after-fix runtime output showing a real bundled-fallback estimate; add redacted terminal or app proof, with private account or endpoint data removed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Verify non-standard billing rates from a provider contract (P2) - The linked announcement establishes only Terra and Luna standard input/output prices, but this change also rewrites cache-read, cache-write, and above-threshold values. The table explicitly says these multipliers are provider contracts rather than values inferred from Standard, so this can publish incorrect fallback USD estimates. Source each changed non-standard term from the complete rate card, or leave unsupported values unchanged.
  • Resolve merge risk (P2) - Merging unverified cache and long-context rate changes could systematically understate or overstate USD cost estimates for users whose catalog fallback is active.
  • Resolve merge risk (P2) - The PR has no attached after-fix runtime output showing that the bundled fallback is selected and produces the intended displayed estimates.
  • Complete next step (P2) - The remaining blocker is authoritative provider-rate verification plus contributor-supplied real behavior proof, neither of which is safe for an automated repair lane to infer.

Findings

  • [P2] Verify non-standard billing rates from a provider contract — Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift:215-239
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Pricing surface 3 files affected; 22 additions, 22 deletions The diff is narrowly scoped to bundled fallback data, its generated fingerprint, and pricing expectations.
Non-standard billing dimensions 6 cache/long-context field groups changed These fields drive estimates beyond the four standard input/output prices confirmed by the cited announcement.

Merge-risk options

Maintainer options:

  1. Verify the complete billing schedule (recommended)
    Update only the cache and long-context values supported by an authoritative pricing contract and add direct coverage for every confirmed billing dimension before merge.
  2. Pause the rate expansion
    Keep this PR draft until the provider publishes or supplies the non-standard GPT-5.6 terms needed to justify the bundled fallback changes.

Technical review

Best possible solution:

Verify each changed cache, cache-write, and long-context term against the complete authoritative GPT-5.6 pricing contract, retain any field without direct support, then attach redacted terminal or app evidence of the fallback calculation using the corrected rates.

Do we have a high-confidence way to reproduce the issue?

No high-confidence runtime reproduction was supplied. Source review does show a concrete verification path: compare every changed bundled billing dimension with the authoritative provider rate card, because the linked announcement confirms only standard input/output pricing.

Is this the best way to solve the issue?

No. Updating the four announced standard rates is appropriate, but deriving cache and long-context terms conflicts with the existing contract-aware design; those values should change only with direct provider evidence.

Full review comments:

  • [P2] Verify non-standard billing rates from a provider contract — Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift:215-239
    The linked announcement establishes only Terra and Luna standard input/output prices, but this change also rewrites cache-read, cache-write, and above-threshold values. The table explicitly says these multipliers are provider contracts rather than values inferred from Standard, so this can publish incorrect fallback USD estimates. Source each changed non-standard term from the complete rate card, or leave unsupported values unchanged.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.92

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8ef86077e70a.

Labels

Label justifications:

  • P2: This is a focused but user-visible cost-estimate accuracy issue rather than an availability or security regression.
  • merge-risk: 🚨 other: Unverified provider billing terms can make bundled fallback cost calculations inaccurate after merge.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists focused tests and checks but includes no attached after-fix runtime output showing a real bundled-fallback estimate; add redacted terminal or app proof, with private account or endpoint data removed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Bundled-rate contract boundary: The current table explicitly states that cache-write, long-context, and priority values are provider contracts and must not be inferred from standard pricing; the PR changes cache and long-context values while its cited announcement states only the new standard input/output prices. (Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift:191, 8ef86077e70a)
  • Changed non-standard rate fields: The branch changes Terra and Luna cache-read, cache-write, and above-threshold rates alongside standard input/output prices, but the linked OpenAI announcement provides only the four standard per-million-token figures. (Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift:210, 29a46c48a3e9)
  • Focused tests inherit the same assumptions: The updated tests assert the derived standard and long-context values, so they protect internal consistency but do not establish that the changed non-standard provider rates are authoritative. (Tests/CodexBarTests/CostUsagePricingTests.swift:133, 29a46c48a3e9)
  • Official announcement verification: The OpenAI announcement effective July 30, 2026 confirms Terra at $2/$12 and Luna at $0.20/$1.20 per million input/output tokens, while leaving cache and long-context terms unspecified; Sol remains unchanged.
  • Repository policy applied: The repository policy calls for focused parser/provider validation and requires real runtime proof for behavior changes; this review treats the PR’s listed tests as supplemental rather than as proof of observed after-fix behavior. (AGENTS.md:12, 8ef86077e70a)

Likely related people:

  • steipete: The pricing table is a bundled fallback contract affecting user-visible cost estimates, and the repository owner is the only evidenced routing candidate available from the checked-out repository context; feature-history attribution could not be established more specifically from the read-only inspection environment. (role: repository owner and likely pricing-surface decision owner; confidence: low; files: Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift, Tests/CodexBarTests/CostUsagePricingTests.swift)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Cite the complete provider rate card for every changed cache and long-context field, or revert unsupported fields.
  • Attach redacted after-fix runtime proof that forces the bundled fallback and shows Terra and Luna cost estimates.
  • After adding proof, update the PR body to trigger re-review; a maintainer can comment @clawsweeper re-review if needed.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@iam-brain
iam-brain marked this pull request as ready for review July 31, 2026 00:19

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment on lines +218 to +220
inputCostPerToken: 2e-6,
outputCostPerToken: 1.2e-5,
cacheReadInputCostPerToken: 2e-7,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant