Skip to content

🤖 fix: cap GPT-5.6 context over Codex OAuth#3724

Merged
coadler merged 1 commit into
mainfrom
fix/gpt-56-oauth-context-cap
Jul 14, 2026
Merged

🤖 fix: cap GPT-5.6 context over Codex OAuth#3724
coadler merged 1 commit into
mainfrom
fix/gpt-56-oauth-context-cap

Conversation

@coadler

@coadler coadler commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Apply the ChatGPT/Codex OAuth context caps to the GPT-5.6 family while retaining the public 1.05M context window for API-key requests. Sol and the bare GPT-5.6 alias use 272K; Terra and Luna use 128K.

Background

The ChatGPT/Codex OAuth routing layer has lower context limits than the public OpenAI API. GPT-5.6 was initially allowed through OAuth without route-specific context overrides, causing compaction and the token meter to use the API's 1.05M limit.

Implementation

  • Add tier-specific Codex OAuth overrides for the bare GPT-5.6 alias and the Sol, Terra, and Luna tiers.
  • Cover every GPT-5.6 OAuth model ID in the context-limit tests.
  • Update token-meter coverage to use the effective OAuth limit.

Risks

Low. The overrides only apply when direct OpenAI requests actually route through Codex OAuth. API-key and gateway-routed requests continue using their existing model metadata.


Generated with mux • Model: openai:gpt-5.6-sol • Thinking: medium • Cost: $5.63

@coadler

coadler commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 6486e29d00

ℹ️ 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 thread src/common/constants/codexOAuth.ts Outdated
@coadler coadler force-pushed the fix/gpt-56-oauth-context-cap branch from 6486e29 to b5e3c51 Compare July 14, 2026 18:41
@coadler

coadler commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Updated the OAuth overrides to use 272K for Sol/the bare alias and 128K for Terra/Luna, with tier-specific test coverage.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: b5e3c510de

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

@coadler coadler added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 45532d7 Jul 14, 2026
24 checks passed
@coadler coadler deleted the fix/gpt-56-oauth-context-cap branch July 14, 2026 19:06
mux-bot Bot added a commit that referenced this pull request Jul 14, 2026
The CODEX_OAUTH_CONTEXT_WINDOW_OVERRIDES doc comment already explains that these caps are kept separate from model metadata so API-key requests retain the public window. #3724 rewrote the inline comment to restate the same point, so trim the duplicated sentence and keep only the tier-specific rationale. Comment-only; behavior-preserving.
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.

1 participant