Skip to content

fix(codex): allowlist gpt-6.1-terra for ChatGPT-subscription users - #1673

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1793896989-codex-gpt61-terra
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1793896989-codex-gpt61-terra

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #1623

Type of change

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

What does this PR do?

Not backend-probed. @anandgupta42, please probe gpt-6.1-terra before merging. I couldn't call the live POST https://chatgpt.com/backend-api/codex/responses endpoint because I don't have a ChatGPT credential, so this addition rests on catalog evidence only. If it returns 400 … not supported when using Codex with a ChatGPT account, drop it from OAUTH_ALLOWED_MODELS and move it to VERIFIED_REJECTED. If it returns 200, move it from CATALOG_VERIFIED_UNPROBED to VERIFIED_ACCEPTED.

OAUTH_ALLOWED_MODELS in packages/opencode/src/plugin/codex.ts hides gpt-6.1-terra from ChatGPT Plus/Pro users, even though the official Codex client lists it for them.

Added (catalogs fetched 2026-11-05):

id Codex catalog (openai/codex codex-rs/models-manager/models.json on main) models.dev openai
gpt-6.1-terra added in openai/codex@126a0ee92e (2026-10-26, "Add GPT-6.1 Terra to model catalogs"). visibility: "list", priority 7, upgrade: null, minimal_client_version 0.153.0, plus/pro in available_in_plans present, release_date 2026-10-26

Removed: none. No allowlisted id has a retirement date or visibility: "hide":

gpt-5.5        list  upgrade -> gpt-6-sol   retirement_at: null
gpt-5.6-sol    list  upgrade -> gpt-6-sol   retirement_at: null
gpt-5.6-terra  list  upgrade -> gpt-6-sol   retirement_at: null
gpt-5.6-luna   list  upgrade -> gpt-6-luna  retirement_at: null
gpt-5.3-codex-spark  not in the shipped catalog

gpt-5.3-codex-spark is missing from the catalog, but it is missing from every revision I checked (back to openai/codex@cf6754e6, 2026-09-21), and #1565 records the same back to 2026-04. It stays because it was backend-probed (VERIFIED_ACCEPTED). The replacement targets gpt-6-sol and gpt-6-luna aren't allowlisted on main yet. #1565 adds them.

Relationship to #1565. #1565 (open, closes #1564) adds gpt-6-astra, gpt-6-luna, gpt-6-sol and gpt-6.1-sol. It was written before openai/codex added gpt-6.1-terra, so it doesn't include it. Both PRs use the same structure: a CATALOG_VERIFIED_UNPROBED test constant and an altimate_change block at the end of the set. Whichever merges second will hit a small textual conflict. The fix is to merge the two CATALOG_VERIFIED_UNPROBED arrays and the two marker blocks.

How the change is structured. Same convention as #1565:

  • gpt-6.1-terra goes into a new test constant, CATALOG_VERIFIED_UNPROBED, not VERIFIED_ACCEPTED. The probed truth table stays honest.
  • The trip-wire test now asserts OAUTH_ALLOWED_MODELS == VERIFIED_ACCEPTED ∪ CATALOG_VERIFIED_UNPROBED.
  • New tests assert that catalog ids are allowlisted and don't overlap either probed list.
  • In codex.ts, the id sits inside an altimate_change block (codex.ts is in requireMarkers). The block records the catalog evidence.

Not touched:

  • plugin/openai/codex.ts ALLOWED_MODELS. That file still isn't wired, and its comments don't ask for parity. Its parseFloat > 5.4 fallback would already admit gpt-6.1-terra.
  • API-key behaviour. The filter only runs when auth.type === "oauth".

Cold-cache caveat. The committed provider/models-snapshot.ts has no GPT-6 entry, so a source checkout won't show this model until the catalog refreshes. Release builds embed the live models.dev catalog (#1188), and that catalog has it.

How did you verify your code works?

  • bun test test/plugin/codex-allowlist.test.ts test/plugin/codex.test.ts in packages/opencode: 34 pass, 0 fail.
  • bun typecheck: the default parallel run is OOM-killed on this 7 GB sandbox, which has nothing to do with this diff. bun turbo typecheck --concurrency=1 passes for the other 12 packages, and tsgo --noEmit --singleThreaded in packages/opencode is clean.
  • bun run script/upstream/analyze.ts --markers --base origin/main --strict: ok.
  • bun script/check-tracker-leaks.ts: clean.
  • Re-parsed both catalogs to build the tables above.
  • Not done: a live backend probe of gpt-6.1-terra (see the top of this description).

Cost side effects

None. This only changes which ids the OAuth model picker keeps. It adds no model calls, queries or resources.

Screenshots / recordings

N/A, not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR
  • I checked for cost side effects (model calls, queries or cloud resources that grow with user data) and described them, or wrote "none"

Written by Devin


Summary by cubic

Adds gpt-6.1-terra to OAUTH_ALLOWED_MODELS in packages/opencode/src/plugin/codex.ts so ChatGPT Plus/Pro users can pick it, matching the official Codex client catalog. Closes #1623.

The model is catalog-verified but hasn't been backend-probed, so it's kept in a new CATALOG_VERIFIED_UNPROBED test bucket and the allowlist trip-wire now asserts OAUTH_ALLOWED_MODELS == VERIFIED_ACCEPTED ∪ CATALOG_VERIFIED_UNPROBED.

Notes

  • Probe gpt-6.1-terra against the live Codex endpoint before merging; move it to VERIFIED_ACCEPTED on HTTP 200, or drop it from the allowlist on HTTP 400.
  • A source checkout won't list the model until the catalog snapshot refreshes; release builds embed the live models.dev catalog, which carries it.
  • If fix(codex): allowlist the GPT-6 family for ChatGPT-subscription users #1565 merges first, this will need a small conflict fix (merge the catalog bucket and marker blocks).

Written for commit 012ab9a. Summary will update on new commits.

View guided diff Turn on auto-fix

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6ca442a3-5907-45be-85fa-3cc819d126d1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

👋 This PR was automatically closed by our quality checks.

Common reasons:

  • New GitHub account with limited contribution history
  • PR description doesn't meet our guidelines
  • Contribution appears to be AI-generated without meaningful review

If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you.

1 similar comment
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

👋 This PR was automatically closed by our quality checks.

Common reasons:

  • New GitHub account with limited contribution history
  • PR description doesn't meet our guidelines
  • Contribution appears to be AI-generated without meaningful review

If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you.

@dev-punia-altimate

Copy link
Copy Markdown
Contributor

🤖 Code Review — OpenCodeReview (Gemini) — No Issues Found

No supported files changed.

This branch has not been deployed

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

Projects

None yet

1 participant