🤖 fix: GPT-5.6 Sol promotional pricing and GPT-6 Astra Codex context cap - #4684
Conversation
|
@codex review |
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…log (coder#4710) ## Summary The Codex OAuth context cap for the GPT-5.6 family (`gpt-5.6`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`) goes from 372K to 272K, matching the first-party Codex catalog. API-key requests keep the public 1.05M window. ## Background coder#4683 asked where coder#3730's 372K came from before changing it. - coder#3730 (merged 2026-07-15) says it copied the `openai/codex` catalog, which "lists `context_window: 372000` for Sol, Terra, and Luna". That PR has no discussion of observed Codex behavior and no deliberate override. - Catalog history (`codex-rs/models-manager/models.json`): - [`c38c30ef`](https://github.com/openai/codex/blob/c38c30ef514dc74aa6ea59748f280c235b1bca2a/codex-rs/models-manager/models.json) (2026-07-14): Sol/Terra/Luna `context_window: 372000`, `max_context_window: 372000`. - [`2eee483e`](openai/codex@2eee483) (openai/codex#39102, "Raise the GPT-5.6 maximum context window", 2026-08-17): `context_window: 272000`, `max_context_window: 872000`. - The pin the repo already cites ([`04fc75ad`](https://github.com/openai/codex/blob/04fc75adbe67a612a1cb0fc469533f24b24fa499/codex-rs/models-manager/models.json)) and `main` (checked 2026-09-26) both still have 272000 / 872000. So 372K came only from an older catalog. This PR uses the default `context_window`, the same convention as GPT-5.5 and the GPT-6 Astra/Sol/Luna entries (coder#4259, coder#4684). ## Validation The routing and meter expectations were updated first and failed on `main`: `codexOAuth.test.ts` (GPT-5.6 family overrides), `contextLimit.test.ts` (OAuth-routed effective limit per tier), and `tokenMeterUtils.test.ts` (OAuth meter max and percentage for Sol). The API-key → 1.05M assertions in those files are unchanged and still pass. <details> <summary>Pre-fix failures</summary> ``` Expected: 272000 Received: 372000 (fail) codexOAuth model gating > allows the GPT-5.6 family through Codex OAuth without requiring it (fail) calculateTokenMeterData > uses the Codex OAuth cap for GPT-5.6 token meter percentages (fail) getEffectiveContextLimit > caps the GPT-5.6 family at each tier's Codex OAuth context window 36 pass 3 fail ``` </details> ## Risks Low. Only direct OpenAI requests routed through Codex OAuth are affected. They now start limit-driven compaction at 272K instead of 372K, which is the documented default window. API-key, gateway and Coder routes are unchanged. Fixes coder#4683 --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high -->
Summary
Reconciles two OpenAI catalog entries with their first-party sources: GPT-5.6 Sol now prices at OpenAI's current promotional rates, and GPT-6 Astra's Codex OAuth context cap drops from 372K to the catalog's 272K.
Background
Both discrepancies were found while validating #4259 and tracked in #4347.
Pricing source. OpenAI API pricing, fetched 2026-09-26. GPT-5.6 Sol (per 1M tokens):
The page says "GPT-5.6 Sol's promotional pricing is available at least through November 21, 2026." The previous entry ($5/$30/$0.50/$6.25; long context $10/$45/$1/$12.50) was the standard rate. The multipliers (2x input, 1.5x output, 1.25x cache writes, 272K boundary) are unchanged.
Catalog source. openai/codex@04fc75ad
models.json, the pin the repo already cites:gpt-6-astrahascontext_window: 272000andmax_context_window: 872000. openai/codexmain(checked 2026-09-26) has the same values.Implementation
models-extra.ts:GPT_56_SOL_STATS(shared bygpt-5.6-soland the baregpt-5.6alias) now uses the promo rates.TODO(2026-11-21)that records the standard rates and the source. No new mechanism. The older precedent (Claude Sonnet 5, DeepSeek V4 Pro) listed the standard rate instead. I picked the billed rate because the issue asks for it, the promotion has no fixed end date, and the pricing page no longer shows a standard rate for Sol.codexOAuth.ts:gpt-6-astra372K → 272K, with the pin cited next to Sol/Luna. Public API windows (1.05M) and user-mapped models are unchanged: the cap applies only when a request actually routes through Codex OAuth.Validation
Tests were changed first and failed on
main:displayUsage.test.ts› "applies %s pricing only above the 272K boundary" now includesopenai:gpt-5.6-solandopenai:gpt-5.6. It checks 272,000 vs 272,001 prompt tokens and now also checks cache writes (1.25x the active input rate), so the boundary is shown to move input, cache-read, cache-write and output rates together.codexOAuth.test.ts(Astra override) andcontextLimit.test.ts› "caps GPT-6 Astra on the OAuth route but keeps the API window for API-key auth" (272K on OAuth, 1.05M with API-key auth).modelStats.test.tsbase-rate row for Sol updated. Its long-context assertions are multipliers of the base rates, so they checked the new values unchanged.Pre-fix failures
After the fix,
bun test src/commonpasses (2380 tests) andmake static-checkpasses.Risks
Low. Sol cost estimates and goal budgets drop by 20–33% until the promotion ends. The dated TODO marks when to restore them. OAuth-routed Astra now starts limit-driven compaction at 272K instead of 372K.
Deferred
Fixes #4347
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high