GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Codex subscription model list and picker by saoudrizwan · Pull Request #14011 · cline/cline

Conversation

@saoudrizwan

@saoudrizwan saoudrizwan commented Sep 9, 2026 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Related Issue

Issue: CLINE-3232

Description

Selecting the "OpenAI ChatGPT Subscription" (openai-codex) provider in the desktop app showed the full OpenAI API catalog in the model picker (chatgpt-image-latest, gpt-4.1, gpt-4o, o3, ...) instead of the Codex-only list. Two commits:

1. Stop the picker from overwriting the Codex list (@cline/core)

toProviderConfig builds knownModels from the generated catalog keys for the provider. openai-codex intentionally shares the openai-native catalog, but that raw catalog was never run through filterOpenAICodexModels. The desktop sidecar and the hub both call getLocalProviderModels(provider, manager.getProviderConfig(provider)), and the unfiltered config.knownModels wins in mergeKnownModels, overwriting the correct registry list. The same config feeds the runtime handler, so the Codex context caps were also dropped. Fix: apply filterOpenAICodexModels to the config-derived catalog for openai-codex.

2. Align the Codex rules with opencode / OpenAI (@cline/llms)

Our filter was originally a port of opencode's ChatGPT-plan rules and had drifted. Mirrors opencode v2 plugin/provider/openai.ts as of today:

  • Drop gpt-5.4 and gpt-5.4-mini. OpenAI retired them for ChatGPT accounts in Codex on 2026-08-31 (help article, "What happens to GPT-5.4 and GPT-5.4 mini in Codex?"); opencode confirmed the backend now rejects them (#48141).
  • Move the provider default from gpt-5.4 to gpt-5.6-terra, OpenAI's stated replacement. A retired default would also be re-injected into the list as a fallback model.
  • Compare GPT versions by major/minor so integer versions (gpt-6-astra) and multi-digit minors are not dropped by parseFloat (opencode #47384, #47385).
  • Explicit allow list gpt-5.5, gpt-5.3-codex-spark; explicit deny gpt-5.5-pro and the bare gpt-5.6 alias of the Sol variant.
  • Cap every Codex model at the 400K context / 272K input / 128K output backend budget instead of only gpt-5.5, so GPT-5.6+ no longer inherits the API's 1.05M limits (the 95% effective-input factor is kept).

Resulting list: gpt-5.3-codex-spark, gpt-5.5, gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-6-astra.

Test Procedure

  • New toProviderConfig test asserts the Codex config excludes the OpenAI API models and carries the Codex caps. Fails on main, passes here.
  • Rewrote openai-codex-models.test.ts for the new rules (retired 5.4s, bare gpt-5.6, integer major versions, cap behaviour, smaller catalog limits preserved). Updated the registry and resolveProviderConfig tests accordingly.
  • Reproduced the exact sidecar path (getLocalProviderModels("openai-codex", toProviderConfig(settings))) in a scratch script. Before: 33 models including the OpenAI API list from the screenshot. After: the 6 models above, default gpt-5.6-terra.
  • @cline/llms full suite: 795 passed (1 pre-existing Bedrock failure unrelated to this change, also fails on main). @cline/core services/llms, local-provider-service, provider-settings-manager: 183 passed. tsc clean for @cline/llms; Biome clean on touched files.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (bun test) and code is formatted and linted (bun run format && bun run lint)
  • I have reviewed contributor guidelines

Screenshots

Before (sidecar list_provider_models path):

openai-codex picker models (33): chatgpt-image-latest, gpt-4.1, gpt-4.1-mini, gpt-4o, gpt-4o-2024-08-06, gpt-4o-2024-11-20, gpt-4o-mini, gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-pro, gpt-5.1, gpt-5.2, gpt-5.2-pro, gpt-5.3-codex, gpt-5.3-codex-spark, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.4-pro, gpt-5.5, gpt-5.5-pro, gpt-5.6, gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-6-astra, gpt-image-1-mini, gpt-image-1.5, gpt-image-2, gpt-realtime-2.1, o3, o3-pro

After:

default model: gpt-5.6-terra
openai-codex picker models (6): gpt-5.3-codex-spark, gpt-5.5, gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-6-astra

Additional Notes

  • gpt-5.3-codex-spark was deliberately removed from our list in Clean-up the Codex model list #11342 based on the Codex app menu at the time. opencode keeps it allowed and verified it still works against the Codex endpoint with a ChatGPT credential on 2026-09-09, so it is back in. Easy to drop again if we prefer to follow the Codex app menu.
  • Users with openai-codex settings still pinned to gpt-5.4 / gpt-5.4-mini will get a backend error until they pick a new model; that is the same behaviour as the Codex CLI.
  • The hub (apps/cline-hub/src/server/providers.ts) uses the same getLocalProviderModels(provider, getProviderConfig(provider)) call, so the CLI picker benefits from the first commit too.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
saoudrizwan and others added 2 commits September 9, 2026 21:51
@saoudrizwan
fix(core): limit ChatGPT subscription known models to the Codex catalog
3ccb61b
toProviderConfig filled knownModels for openai-codex with the raw
openai-native catalog it shares, so the desktop/hub model picker
(list_provider_models) overwrote the filtered Codex list with the full
OpenAI API catalog (gpt-4o, gpt-4.1, chatgpt-image-latest, ...), and the
runtime handler lost the Codex context caps. Apply filterOpenAICodexModels
when building the config-derived catalog.

Fixes CLINE-3232

Co-authored-by: Saoud Rizwan <[email protected]>
@saoudrizwan
fix(llms): align ChatGPT subscription model rules with Codex
1eb08b3
Mirror opencode's current ChatGPT-plan rules for the shared OpenAI catalog:

- Drop gpt-5.4 and gpt-5.4-mini: OpenAI retired them for ChatGPT accounts
  in Codex on 2026-08-31 and the backend now rejects them.
- Move the provider default from gpt-5.4 to gpt-5.6-terra, OpenAI's stated
  replacement. Keeping a retired default would also re-inject it into the
  list as a fallback model.
- Compare GPT versions by major/minor so integer versions (gpt-6-astra)
  and multi-digit minors are not dropped by parseFloat.
- Allow gpt-5.3-codex-spark explicitly; deny gpt-5.5-pro and the bare
  gpt-5.6 alias of the Sol variant.
- Cap every Codex model at the 400K / 272K / 128K backend budget instead
  of only gpt-5.5, so GPT-5.6+ no longer inherits the API's 1.05M limits.

Co-authored-by: Saoud Rizwan <[email protected]>
@github-actions github-actions Bot deleted a comment from cursor Bot Sep 9, 2026
@greptile-apps

greptile-apps Bot commented Sep 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR corrects the ChatGPT Subscription model picker and runtime metadata by applying Codex-specific filtering to the generated OpenAI catalog.

  • Moves the Codex default to gpt-5.6-terra.
  • Updates eligibility rules to expose the supported Codex-only model set and remove retired or unsupported aliases.
  • Caps Codex context, input, and output metadata to the backend budget while preserving smaller catalog limits.
  • Adds coverage for provider configuration, catalog filtering, version parsing, and model limits.

Confidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, or repository-rule issue remains in the reviewed changes.

The generated catalog is filtered before entering the Codex provider configuration, the default points to an eligible model, and the updated tests cover the intended model set and backend limits.

Important Files Changed

Filename Overview
sdk/packages/llms/src/providers/openai-codex-models.ts Updates Codex model eligibility and consistently constrains model limits to the subscription backend budget.
sdk/packages/llms/src/providers/builtins.ts Adds runtime-aware generated catalog resolution and applies Codex filtering to the shared OpenAI catalog.
sdk/packages/core/src/services/llms/provider-settings.ts Uses runtime-aware catalog generation so Codex provider configurations no longer carry the full OpenAI API model list.
sdk/packages/llms/src/providers/openai-codex-models.test.ts Covers supported and rejected model IDs, numeric version comparison, immutable filtering, and backend limit enforcement.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Generated OpenAI catalog] --> B[getGeneratedModelsForRuntimeProvider]
    B -->|openai-native| C[Unfiltered OpenAI models]
    B -->|openai-codex| D[filterOpenAICodexModels]
    D --> E[Codex eligibility rules]
    E --> F[Apply 400K / 272K / 128K caps]
    F --> G[Provider config and model picker]
Loading

Reviews (3): Last reviewed commit: "Merge branch 'main' into saoudrizwan/cod..." | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

saoudrizwan and others added 2 commits September 10, 2026 01:01
@saoudrizwan
refactor(llms): own the Codex catalog view in @cline/llms
6e62852
Move the ChatGPT-subscription special case out of core's generic
toProviderConfig into a getGeneratedModelsForRuntimeProvider helper next to
buildOpenAICodexModels, so core just asks llms for the catalog a runtime
provider reads from.

Co-authored-by: Saoud Rizwan <[email protected]>
@saoudrizwan
Merge branch 'main' into saoudrizwan/codex-subscription-model-list-73ab
041aa02
@saoudrizwan
saoudrizwan merged commit c52e87d into main Sep 10, 2026
22 of 24 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@saoudrizwan
saoudrizwan deleted the saoudrizwan/codex-subscription-model-list-73ab branch September 10, 2026 01:55
@teknium1 teknium1 mentioned this pull request Sep 17, 2026
fix(codex): ChatGPT Codex picker no longer offers retired gpt-5.4 / gpt-5.4-mini (port cline#14011) NousResearch/hermes-agent#113615
Open
raitoxlol pushed a commit to raitoxlol/hermes-agent that referenced this pull request Nov 23, 2026
@teknium1
fix(codex): drop retired gpt-5.4 / gpt-5.4-mini from the ChatGPT Code…
705e869
…x picker (port cline/cline#14011)

OpenAI retired GPT-5.4 and GPT-5.4 mini for ChatGPT-account Codex on 2026-08-31
(replacements: GPT-5.6 Terra / GPT-5.6 Luna); the backend now answers
invalid_request_error "not supported when using Codex with a ChatGPT account"
for both. Hermes still surfaced them in the openai-codex picker three ways:

- DEFAULT_CODEX_MODELS listed both in the offline curated fallback.
- _FORWARD_COMPAT_TEMPLATE_MODELS had rows synthesizing gpt-5.4 and gpt-5.4-mini
  from gpt-5.3-codex. Synthesis runs on LIVE catalogs too, so even an
  authoritative account catalog without gpt-5.4 produced gpt-5.4, gpt-5.4-900k
  and gpt-5.4-mini as dead picker entries.
- A ~/.codex models_cache.json / config.toml written before the cutoff could
  resurrect them on the fallback path.

Fix: remove both from the curated list and the template rows, and filter
RETIRED_CODEX_MODELS from the NON-live sources only. A successful live catalog
stays authoritative and may re-advertise them if OpenAI re-enables the slugs.

Refs: https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan
Mirrors cline/cline#14011 and anomalyco/opencode#48141 (live rejection observed
2026-09-08/09).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@saoudrizwan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.