Skip to content

openai_subscribed: Discover account-specific models - #62651

Merged
anantdgoel merged 2 commits into
mainfrom
openai-subscription-dynamic-models
Aug 14, 2026
Merged

openai_subscribed: Discover account-specific models#62651
anantdgoel merged 2 commits into
mainfrom
openai-subscription-dynamic-models

Conversation

@anantdgoel

@anantdgoel anantdgoel commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

ChatGPT subscription model availability is determined by the authenticated Codex backend and can vary by account. The provider currently exposes a bundled static list and defaults to GPT-5.6 Sol, so users can be offered a model that their ChatGPT account subsequently rejects.

This change fetches the account-scoped Codex model catalog after loading stored credentials and after sign-in. Requests use the existing OAuth token, ChatGPT account ID, Zed originator, and the Zed client version. Picker-visible models are ordered by the server's priority, and the returned metadata drives model names, context windows, image support, reasoning levels, and Fast Mode support.

The bundled list remains available before discovery and when discovery fails. A failed refresh preserves the last usable catalog and surfaces the failure in provider settings, while generation checks prevent a response for an older account or request from replacing newer state. Model discovery uses the same five-second timeout as Codex so a stalled catalog endpoint cannot indefinitely delay authentication. Zed's language model provider now derives its provided, default, recommended, and fast models from that resolved catalog.

Testing performed:

  • cargo nextest run -p openai_subscribed
  • cargo nextest run -p language_models
  • ./script/clippy -p openai_subscribed -p language_models --lib
  • cargo fmt --all -- --check
  • git diff --check

Release Notes:

  • Fixed ChatGPT subscription accounts offering models that are not available to them.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Aug 14, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Aug 14, 2026
@anantdgoel
anantdgoel added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit 3cf86be Aug 14, 2026
38 checks passed
@anantdgoel
anantdgoel deleted the openai-subscription-dynamic-models branch August 14, 2026 20:48
playdohface pushed a commit to playdohface/zed that referenced this pull request Aug 29, 2026
…2651)

ChatGPT subscription model availability is determined by the
authenticated Codex backend and can vary by account. The provider
currently exposes a bundled static list and defaults to GPT-5.6 Sol, so
users can be offered a model that their ChatGPT account subsequently
rejects.

This change fetches the account-scoped Codex model catalog after loading
stored credentials and after sign-in. Requests use the existing OAuth
token, ChatGPT account ID, Zed originator, and the Zed client version.
Picker-visible models are ordered by the server's priority, and the
returned metadata drives model names, context windows, image support,
reasoning levels, and Fast Mode support.

The bundled list remains available before discovery and when discovery
fails. A failed refresh preserves the last usable catalog and surfaces
the failure in provider settings, while generation checks prevent a
response for an older account or request from replacing newer state.
Model discovery uses the same five-second timeout as Codex so a stalled
catalog endpoint cannot indefinitely delay authentication. Zed's
language model provider now derives its provided, default, recommended,
and fast models from that resolved catalog.

Testing performed:

- `cargo nextest run -p openai_subscribed`
- `cargo nextest run -p language_models`
- `./script/clippy -p openai_subscribed -p language_models --lib`
- `cargo fmt --all -- --check`
- `git diff --check`

Release Notes:

- Fixed ChatGPT subscription accounts offering models that are not
available to them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants