Skip to content

provider/catalog: openai models selected via models.dev or config dropped when connected with ChatGPT oauth #52878

Closed

Description

@kerloom

Summary

Provider catalog for OpenAI connected via "Sign in with ChatGPT" does not include
models released after the bundled build, because the output of the account model
fetch is reconciled against models.dev, but the connection fallback drops newly
released models while they exist in models.dev only. Composite effect: even after
the models-dev catalog snapshot refreshes (contains gpt-6.1-sol, updated
2026-10-02), /models still lists only the values matching an allowlist that
shipped in the binary (gpt-5.5, gpt-5.6-*, gpt-6-astra).

Repro of includes:

  • Account fetch (plugin opencode.provider.chatgpt, method chatgpt-token-sharing)
    refreshed 2026-10-02 19:19 with slugs:
    gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5 — missing
    gpt-6.1-sol (released 2026-09-29) fully, even in models.dev catalog already.
  • Config-merged model entry under providers.openai.models["gpt-6.1-sol"] (with
    capabilities and limit set) did not appear in the model list, forcing the
    account-list fallback to win out over the config merge.

Environment

  • opencode version: 2.0.22
  • OS: Linux omarchy 7.1.13-3-2-ARCH feat: compact and other improvements #1 SMP PREEMPT_DYNAMIC Sat, 19 Sep 2026 (aarch64)
  • Terminal: TERM=xterm-256color, COLORTERM=truecolor
  • Shell: /bin/bash
  • Install/channel: latest (standalone self-updated binary at ~/.opencode/bin)
  • Active plugins: built-in opencode.provider.chatgpt (none user-configured)

Reproduction

  1. Connect OpenAI provider via "Sign in with ChatGPT" (oauth,
    chatgpt-token-sharing).
  2. On 2026-10-02, after gpt-6.1-sol release (2026-09-29):
    opencode api get /api/model → 11 openai entries
    (gpt-6-astra,-fast,-ultrafast, gpt-5.6-{sol,terra,luna}(-fast),
    gpt-5.5(-fast)) — no gpt-6.1-sol.
  3. models.dev live (https://models.dev/api.json) and the persisted
    models-dev:catalog snapshot in opencode.db (kv) both contain
    gpt-6.1-sol.
  4. Add to opencode.json:
    "providers": { "openai": { "models": { "gpt-6.1-sol": { "name": "GPT-6.1 Sol",
        "capabilities": { "tools": true, "input": ["text","image"],
        "output": ["text"] }, "limit": { "context": 1050000, "output": 128000 } } } } }
    Restart service. gpt-6.1-sol still absent from /api/model output.

Expected Behavior

A model present in upstream models.dev (and/or explicitly configured in
providers.openai.models) should be listed by /models regardless of the
hardcoded fallback allowlist for an oauth-connected OpenAI provider, since
models.dev is used as canonical catalog metadata by OpenCode.

Or, if the allowlist is intentional for the ChatGPT-plan account, the
config-defined model merge should still take effect over it.

Actual Behavior

  • /models only shows the 11 allowlisted models; gpt-6.1-sol is filtered out.
  • Config-merged model entry is silently dropped (no error, no log line) in the
    same scenario.

Additional Context

  • Persisted models-dev:catalog kv row 2026-10-02 19:14:07 correctly includes
    gpt-6.1-sol (53 openai models total).
  • Server route GET /api/provider/openai reports activation: "auto",
    package @opencode/ai/providers/openai, oauth credential active.
  • opencode upgrade reports "2.0.22 is already installed", so no newer release
    carries the fix.
  • Frequency: consistent since gpt-6.1-sol launch.
  • Workaround tried: config-merge (see step 4) — no effect.

Activity

  1. github-actions commented on Oct 3, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #52375: Reports gpt-6.1-sol missing from OpenAI ChatGPT OAuth models, and that a providers.openai.models override does not take effect.
  2. kerloom commented on Oct 3, 2026

    @kerloom
    Author

    Correction after further verification (my original analysis was partially wrong):

    The hardcoded allowlist (oD in the chatgpt provider) is only the fallback path used when no account model list exists. The actual gate on my machine is OpenAI's own account endpoint:

    • GET https://api.openai.com/v1/models with the stored oauth token (valid, freshly refreshed) returns exactly 7 entries: codex-auto-review, gpt-5.5, gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, gpt-6-astra, gpt-reserve — no gpt-6.1-sol, gpt-6-sol, or gpt-6-luna.
    • The plugin's refreshModels succeeded (no 'failed to refresh ChatGPT models' in logs) and stored exactly those filtered slugs; the catalog merge then correctly intersects account list × models.dev.

    So OpenCode is behaving as designed for the account-list path, and the missing model is an OpenAI-side per-credential gap (same account sees the model on another machine, so likely per-oaiapp-client or session entitlement).

    Remaining verified bug in OpenCode: a model added via config under providers.openai.models["gpt-6.1-sol"] (with name, capabilities, limit) is silently dropped and never appears in /api/model output for a connection-backed provider, even after service restart. Per the Models docs, config entries should be able to extend the catalog. That override path would have been a valid workaround here.

  3. skaldebane commented on Oct 3, 2026

    @skaldebane

    Facing the same thing with Sign in with ChatGPT. Had to switch back to the legacy Codex sign-in method.

  4. matdev83 commented on Oct 5, 2026

    @matdev83

    Me too — reproduced locally with OpenCode v2.0.20 on Debian 13 (CLI/background service). After a fresh successful ChatGPT sign-in, gpt-6.1-sol and gpt-6-luna are missing even though the public catalog and local models-dev cache contain them. opencode reload and explicit providers.openai.models overrides do not make them appear.

  5. teddyzxcv commented on Oct 5, 2026

    @teddyzxcv

    same problem, works on opencode v1, didnt work for opencode v2

  6. drhanfastolfe commented on Oct 5, 2026

    @drhanfastolfe

    I'm also affected on OpenCode CLI 2.0.21: openai/gpt-6.1-sol is missing from the OpenAI model list despite a successful OAuth connection.

    This affects the CLI too, not just Desktop, and prevents me from selecting this model in OpenCode.

    Is there a confirmed workaround for current v2 releases without downgrading, or any update on a fix? Thanks.

  7. rekram1-node commented on Oct 5, 2026

    @rekram1-node
    Contributor

    The sign in w/ chatgpt flow syncs from the models endpoint openai provides, so it seems like some models may not be returned for some reason. I contacted them.

  8. teddyzxcv commented on Oct 5, 2026

    @teddyzxcv

    The sign in w/ chatgpt flow syncs from the models endpoint openai provides, so it seems like some models may not be returned for some reason. I contacted them.

    but it works for opencode v1 though, checked on 1.18

  9. rekram1-node commented on Oct 5, 2026

    @rekram1-node
    Contributor

    @teddyzxcv opencode v1 only has codex flow. Opencode v2 has codex, and sign in w/ chatgpt flow. In opencode v2 the codex flow should remain the same.

    The connection mechanisms are named confusingly... I'll make them more clear.

  10. teddyzxcv commented on Oct 5, 2026

    @teddyzxcv

    @teddyzxcv opencode v1 only has codex flow. Opencode v2 has codex, and sign in w/ chatgpt flow. In opencode v2 the codex flow should remain the same.

    The connection mechanisms are named confusingly... I'll make them more clear.

    aaa, understand it better now, thank you!
    tried using "Chatgpt Pro / Plus" option to connect with codex. now the model 6.1 is showing in model picker.

    Image

    fyi @drhanfastolfe @matdev83

  11. teddyzxcv commented on Oct 5, 2026

    @teddyzxcv
  12. vignesh-oai commented on Oct 5, 2026

    @vignesh-oai

    Sign in with ChatGPT does support inference with 6.1-sol. I am working on a fix on our side (OpenAI) on the model listing issue here.

  13. rekram1-node commented on Oct 6, 2026

    @rekram1-node
    Contributor

    For now I'm just going to disable the /models logic and hardcode the list to avoid further disruptions for users.

  14. rekram1-node commented on Oct 6, 2026

    @rekram1-node
    Contributor

    fix will be in v2.0.23

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions