Skip to content

fix(core): hide Codex models ChatGPT accounts reject - #58180

Merged
rekram1-node merged 1 commit into
devfrom
codex-model-allowlist
Oct 22, 2026
Merged

rekram1-node merged 1 commit into
devfrom
codex-model-allowlist

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

None

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Problem: With the ChatGPT browser or headless sign-in (Codex backend), we explicitly allowed gpt-5.5 and gpt-5.3-codex-spark. The Codex backend rejects both for ChatGPT accounts ("not supported when using Codex with a ChatGPT account"), so the model picker offered models that always fail. Spark also got the blanket 400k/272k Codex cap, which is larger than its real 128k/100k window.

Change: Remove the allowlist and raise the version cutoff from "newer than 5.4" to "newer than 5.5". That also covers gpt-5.5-pro, so it no longer needs an entry in the blocklist.

-const codexAllowed = new Set(["gpt-5.5", "gpt-5.3-codex-spark"])
-const codexDisallowed = new Set(["gpt-5.5-pro", "gpt-5.6"])
+const codexDisallowed = new Set(["gpt-5.6"])

-if (!codexAllowed.has(apiID) && (codexDisallowed.has(apiID) || !match || !(major > 5 || (major === 5 && minor > 4))))
+if (codexDisallowed.has(apiID) || !match || !(major > 5 || (major === 5 && minor > 5)))
model before after
gpt-5.3-codex-spark enabled (400k/272k) hidden
gpt-5.5, gpt-5.5-fast enabled hidden
gpt-5.5-pro hidden (blocklist) hidden (version cutoff)
gpt-5.6 hidden hidden
gpt-5.6-, gpt-6, gpt-6.1-sol enabled enabled

Out of scope:

  • The ChatGPT token-sharing sign-in (chatgpt.ts) still lists gpt-5.5 and gpt-5.5-fast as fallbacks. It uses the API endpoint rather than Codex, and we haven't seen it reject them.
  • API-key connections still show the full catalog.

How did you verify your code works?

  • bun test test/plugin/provider-openai.test.ts in packages/core: 5 pass. The ChatGPT filtering test now checks that gpt-5.5 and Spark are hidden, and checks cost, headers, and caps on gpt-5.6-sol.
  • bun typecheck in packages/core: clean.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #47646

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. I ran the updated provider-openai.test.ts against the base code, and it fails there because gpt-5.5 is enabled under ChatGPT sign-in. With this change it passes (5/5), and typecheck in packages/core is clean. I couldn't check the actual Codex rejection without a real ChatGPT account.

The new minor > 5 cutoff hides gpt-5.5, gpt-5.5-fast, gpt-5.5-pro and gpt-5.3-codex-spark. gpt-5.6-* and gpt-6* models stay enabled, and the 400k/272k and gpt-6.1-sol caps are unchanged.

Public API: unchanged. Only which models the OpenAI plugin enables under ChatGPT sign-in changes.

No concerns.

Related: #47646

@rekram1-node
rekram1-node merged commit cdf1c20 into dev Oct 22, 2026
14 of 15 checks passed
@rekram1-node
rekram1-node deleted the codex-model-allowlist branch October 22, 2026 17:19
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