Skip to content

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

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

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