Skip to content

[Bug]: OpenCode model catalog is not reloaded when opencode.json changes; new providers need manual Refresh or app restart #31977

Done

Description

@vee1e

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Start T3 Code (Nightly) with the OpenCode provider enabled and open any thread.
  2. While the app is running, add a new custom provider to the global OpenCode config (~/.config/opencode/opencode.json), e.g.:
"zz-probe": {
  "name": "ZZ Probe",
  "package": "@opencode/ai/providers/openai-compatible",
  "settings": { "apiKey": "probe", "baseURL": "https://api.mistral.ai/v1" },
  "models": { "probe-model": { "name": "ZZ Probe Model" } }
}
  1. Save the file, then open the composer model picker and search for the new model.

Expected behavior

The new provider/model appears in the picker. Upstream OpenCode watches config files and reloads providers without a restart, so T3 Code should pick up the change (or at least re-probe the catalog when the picker opens).

Actual behavior

The new model is absent from the picker. It only appears after either:

  • a full app restart, or
  • going to Settings → Providers and clicking "Refresh provider status" (whose description says it refreshes "versions, and models in the background"), waiting, and reopening the picker.

Verified on the running app: added the probe provider, confirmed it was missing from the picker, clicked Refresh, waited ~8s, reopened the picker — the probe model was then listed as OpenCode · ZZ Probe. So file changes are never picked up automatically; only the manual refresh path re-probes.

Impact

Minor bug or occasional failure

Version or commit

T3 Code (Nightly) desktop 0.1.6-nightly.20261029.3892, OpenCode provider v2.2.5 (opencode v2.2.5 CLI)

Environment

macOS 27.0.1 arm64, desktop app

Logs or stack traces

No errors are logged; the models are silently missing until refresh/restart.

Workaround

Settings → Providers → Refresh provider status, or restart the app. Related but distinct issues: #24459 (project-local opencode.jsonc providers never load) and #15155 (closed boot-time probe race with globally configured providers). This report is about the global catalog going stale after startup.

Activity

  1. added a commit that references this issue on Nov 6, 2026
    4e7e832
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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