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.
3cf86bed1bAnant Goel committed on 8/14/2026, 8:44:17 PM· committed by GitHubparentf0685e0