Skip to content

🤖 fix: GPT-5.6 Sol promotional pricing and GPT-6 Astra Codex context cap - #4684

Merged
ThomasK33 merged 1 commit into
mainfrom
fix/sol-pricing-astra-cap-4347
Sep 26, 2026
Merged

ThomasK33 merged 1 commit into
mainfrom
fix/sol-pricing-astra-cap-4347

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

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):

Input Cached input Cache writes Output
Short context (≤272K) $4.00 $0.40 $5.00 $20.00
Long context (>272K) $8.00 $0.80 $10.00 $30.00

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-astra has context_window: 272000 and max_context_window: 872000. openai/codex main (checked 2026-09-26) has the same values.

Implementation

  • models-extra.ts: GPT_56_SOL_STATS (shared by gpt-5.6-sol and the bare gpt-5.6 alias) now uses the promo rates.
  • Time-limited pricing follows the most recent repo precedent (Gemini 3.7/3.8 Flash intro rates): encode the rate actually billed, with a dated 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-astra 372K → 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 includes openai:gpt-5.6-sol and openai: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) and contextLimit.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.ts base-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
Expected: 272000
Received: 372000
(fail) codexOAuth model gating > allows gpt-6-astra through Codex OAuth with a 272000 context cap
Expected: 0.668
Received: 0.8350000000000001
(fail) createDisplayUsage > tiered long-context pricing > applies openai:gpt-5.6-sol pricing only above the 272K boundary [1.00ms]
(fail) createDisplayUsage > tiered long-context pricing > applies openai:gpt-5.6 pricing only above the 272K boundary
(fail) getEffectiveContextLimit > caps GPT-6 Astra on the OAuth route but keeps the API window for API-key auth
 60 pass
 4 fail

After the fix, bun test src/common passes (2380 tests) and make static-check passes.

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

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T17:57:16.974835Z c0204dc Manual request
🔒 Security Review ✅ Completed 2026-09-26T17:58:06.495335Z c0204dc Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: c0204dc46e

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: c0204dc46e

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 26, 2026
Merged via the queue into main with commit 309e94f Sep 26, 2026
31 checks passed
@ThomasK33
ThomasK33 deleted the fix/sol-pricing-astra-cap-4347 branch September 26, 2026 18:18
yermakoffivan pushed a commit to yermakoffivan/mux that referenced this pull request Sep 27, 2026
…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 -->
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.

🤖 fix: reconcile GPT-5.6 Sol promotional pricing and Astra Codex context cap

1 participant