Skip to content

Fix Codex prolite support and trust reported model availability#2006

Open
ElSargo wants to merge 7 commits intopingdotgg:mainfrom
ElSargo:feat/codex-prolite-fix
Open

Fix Codex prolite support and trust reported model availability#2006
ElSargo wants to merge 7 commits intopingdotgg:mainfrom
ElSargo:feat/codex-prolite-fix

Conversation

@ElSargo
Copy link
Copy Markdown
Contributor

@ElSargo ElSargo commented Apr 13, 2026

Note

This is a revised version of #1980 with a narrower scope and a clearer write-up of the known tradeoffs.

What Changed

This PR adds support for the new distinction between pro and prolite in Codex account handling.

Reference:
https://help.openai.com/en/articles/9793128-what-is-chatgpt-pro

The change has two parts:

  1. Add a prolite account profile alongside the existing plan types.
  2. Respect the Codex app-server model/list response when it returns a non-empty model list.

The second part is important because the app-server can currently report this account type as unknown, and in that case account-based gating alone is not sufficient to determine whether gpt-5.3-codex-spark should be available.

Why

In my testing, the Codex app-server currently reports prolite accounts as unknown.

Before this change, T3 Code only treated pro accounts as Spark-capable, so gpt-5.3-codex-spark was filtered out for prolite users even when the app-server itself reported Spark as available.

This PR fixes that in two ways:

  1. Add explicit prolite support for when the app-server catches up and reports the newer plan type directly.
  2. Prefer the app-server's advertised model list when it is available, so stale account taxonomy does not incorrectly hide supported models.

Potential Issues

Technically possible startup latency increase

This revised PR explicitly keeps model/list in the one-shot app-server discovery probe, so provider discovery now waits for account/read, skills/list, and model/list.

If model/list were to hang while the other requests succeeded, startup could take longer than before.

Why I think this is acceptable:

  • I reviewed prior Codex app-server versions and was not able to reproduce a case where model/list hung while the other probe requests succeeded.
  • Based on that investigation, I do not have evidence that model/list is uniquely failure-prone relative to the other probe requests.
  • In practice, this appears more likely to behave like the other discovery calls: they either succeed together or fail together.

Possibility of selecting a model that later fails server-side

Because this PR is specifically meant to handle cases where account type is reported as unknown, model availability may depend on model/list rather than account classification alone.

Why I think this is acceptable:

  • Any newly exposed models come from the app-server's own advertised model list.
  • This means the UI is following the server's stated capabilities rather than guessing based on incomplete account metadata.

UI Changes

gpt-5.3-codex-spark now appears in the model selector for prolite users.

Before:
57d7746

Before

After:

After

Other Considerations

I was not able to test this change against other account types.

This PR may look larger than the behavior change suggests because it also factors shared Codex model parsing and metadata into apps/server/src/provider/codexModels.ts.


Note

Medium Risk
Changes model selection and provider discovery to trust app-server model/list results (with new fallbacks) and adds custom-model passthrough, which can alter which model is used at runtime and affect session startup if model/list misbehaves.

Overview
Adds Codex prolite plan support so ChatGPT Pro Lite accounts are labeled correctly and treated as Spark-capable.

Shifts Codex model resolution to trust the app-server’s model/list when it returns a non-empty set: resolveCodexModelForAccount now validates the requested model against reported availability, falls back to gpt-5.3-codex (or the first reported model), and preserves configured custom models even if not reported.

Plumbs reported/configured models through the stack: the app-server manager fetches/parses model/list on session start, discovery probing now includes model/list in the snapshot, CodexProvider prefers reported models over account-based Spark gating, and CodexAdapter forwards customModels from settings. Tests are expanded/added to cover prolite, model-list fallbacks, discovery defaults, and custom model preservation.

Reviewed by Cursor Bugbot for commit f7903e5. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix Codex prolite plan support and prefer app-server reported model availability

  • Adds prolite as a recognized Codex plan type that enables spark, with the label 'ChatGPT Pro Lite Subscription'.
  • probeCodexDiscovery now sends a model/list request and returns available models in CodexDiscoverySnapshot; provider status checks prefer this list over account-plan-based spark gating.
  • resolveCodexModelForAccount now accepts availableModels and customModels, preferring app-server reported models and configured custom models over plan-gating fallback logic.
  • CodexAppServerManager forwards availableModels and customModels into model resolution on both session start and per-turn, and the CodexAdapter passes configured custom models through on startSession.
  • New parsing utilities in codexModels.ts normalize model/list responses, filtering hidden models and preserving built-in display names for known slugs.

Macroscope summarized f7903e5.

ElSargo added 3 commits April 14, 2026 09:09
- add prolite plan support for Spark eligibility and auth labels\n- preserve built-in display names for known app-server models\n- treat non-empty model/list results as trusted model availability\n- ignore empty listed models and wait for model/list in one-shot discovery
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c31dae7e-2ab4-4541-99d3-e4f0e4d19e07

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 13, 2026
Comment thread apps/server/src/provider/codexModels.ts
@ElSargo ElSargo marked this pull request as draft April 13, 2026 21:56
@github-actions github-actions bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Apr 13, 2026
@ElSargo ElSargo marked this pull request as ready for review April 13, 2026 22:08
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 13, 2026

Approvability

Verdict: Needs human review

This PR changes model availability resolution logic to trust app-server reported models instead of hardcoded plan-based gating. Combined with the new prolite plan support and custom models propagation, this affects which models users can access at runtime - warranting human review of the feature gating changes.

You can customize Macroscope's approvability policy. Learn more.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f7903e5. Configure here.


export function readString(value: unknown): string | undefined {
return typeof value === "string" ? value : undefined;
}
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.

Exported readString function is unused outside its file

Low Severity

The readString function is exported from codexModels.ts but is never imported by any other file. It's only used internally by nonEmptyTrimmed within the same module. The export adds unnecessary public API surface to this new shared module.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f7903e5. Configure here.

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

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant