Skip to content

tui: /models picker omits config-defined custom providers (v2.4.0 regression) #65812

Closed as duplicate

Description

@asmodey2948

Summary

After upgrading to opencode v2.4.0 (Windows), the TUI /models picker no longer shows any models from a custom provider defined in opencode.json (providers block, openai-compatible package). The provider itself works fine — sessions run on its models, the CLI lists them, and the server API reports them as enabled. On v2.3.x the picker showed these models.

Environment

  • opencode version: v2.4.0 (@opencode/cli, npm global install via nvm4w shim)
  • OS: Windows 11 (10.0.26300, win32 x64)
  • Terminal: xterm-256color, COLORTERM=truecolor
  • Shell: cmd.exe / PowerShell on Windows
  • Install/channel: release (npm dist-tag latest = 2.4.0)
  • Active plugins: one local plugin (config plugins entry pointing to a folder under ~/.config/opencode/ext/), one remote MCP server configured

Reproduction

  1. Define a custom provider in ~/.config/opencode/opencode.json:
{
  "$schema": "https://opencode.ai/config.json",
  "disabled_providers": ["opencode"],
  "model": "custom/gpt-6-luna",
  "providers": {
    "custom": {
      "name": "custom",
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://<internal-host>/v1",
        "apiKey": "<redacted>"
      },
      "models": {
        "gpt-6-luna": { "name": "gpt-6-luna" },
        "glm-5.3": {
          "name": "glm-5.3",
          "body": { "thinking": { "type": "enabled" } },
          "variants": [{ "id": "low", "body": { "reasoning_effort": "low" } }]
        }
        // ...22 models total, some with body/variants
      }
    }
  },
  "agents": { "build": { "model": "custom/gpt-6-luna" } }
}
  1. Update to v2.4.0 and (re)open the TUI.
  2. Run /models.

Result: empty picker — "Free models / Connect a provider for access to more models / No items available".

  1. Remove "disabled_providers": ["opencode"], reopen the TUI, run /models again.

Result: the picker now shows only the built-in free opencode models. The custom provider still does not appear at all.

Expected Behavior

The /models picker lists all models of the config-defined provider, as it did on v2.3.x.

Actual Behavior

  • With disabled_providers: ["opencode"]: picker is completely empty ("No items available").
  • Without it: only built-in free opencode models are shown; the config-defined provider is never listed.
  • Meanwhile the provider is clearly present and functional on the same install:
    • opencode models (CLI) lists all 22 custom-provider models.
    • Server REST /api/model (with the location param) returns every custom-provider model with enabled: true.
    • Sessions run successfully on the provider's models (the default model from config resolves and is used).
  • Frequency: consistent, 100% reproducible across TUI restarts.
  • Not plugin-related: disabling the plugin's TUI module (keeping its config entry) changes nothing; the picker stays empty.

Additional Context

  • Regression introduced between v2.3.x and v2.4.0 (update installed 2026-11-23).
  • disabled_providers itself appears to work correctly (it hides the built-in opencode free models) — the bug is that config-defined providers are never surfaced by the picker in v2.4.0.
  • Workaround: switching models by editing the config's model / agents.*.model fields; the CLI opencode models output still shows the full catalog.

Activity

  1. opencodejr commented on Nov 23, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report. Checking opencode models and /api/model was very useful.

    I think this is a duplicate of #60587. v2.4.0 turned on the terminal UI's "new designs" by default. With them on, /models counts a provider as connected only if it has a saved connection, for example one made with /connect. A provider defined only in opencode.json, like your custom provider, doesn't count. So the picker shows the Free models list instead. That explains both results you saw: an empty list when opencode is disabled, and only the free opencode models when it isn't. The server side is fine, as your checks showed.

    The fix is in #65793 ("count config-only providers as connected"). It has been merged, but it isn't in v2.4.0.

    Workaround until a release includes it: turn the new designs off in ~/.config/opencode/cli.json (CLI settings):

    {
      "experimental": { "new-designs": false }
    }

    Then restart the terminal UI. In #60587, this brought back the normal "Select model" dialog with the configured models.

    Possible duplicates and related issues, ordered by likelihood:

    I'm closing this issue now as a duplicate of #60587. Please add any details there. If the models are still missing with new-designs set to false, that's a different problem: reply here and this issue will reopen.

  2. added
    area/tui
    type/bug
    version/v2
    on Nov 23, 2026
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

    area/tuiplatform/windowstype/bugversion/v2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions