Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
Description
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
pluginsentry pointing to a folder under~/.config/opencode/ext/), one remote MCP server configured
Reproduction
- 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" } }
}- Update to v2.4.0 and (re)open the TUI.
- Run
/models.
Result: empty picker — "Free models / Connect a provider for access to more models / No items available".
- Remove
"disabled_providers": ["opencode"], reopen the TUI, run/modelsagain.
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
opencodemodels 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 thelocationparam) returns every custom-provider model withenabled: 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_providersitself appears to work correctly (it hides the built-inopencodefree 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.*.modelfields; the CLIopencode modelsoutput still shows the full catalog.
Activity
opencodejr commentedon Nov 23, 2026
Thanks for the detailed report. Checking
opencode modelsand/api/modelwas 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,
/modelscounts a provider as connected only if it has a saved connection, for example one made with/connect. A provider defined only inopencode.json, like yourcustomprovider, doesn't count. So the picker shows the Free models list instead. That explains both results you saw: an empty list whenopencodeis disabled, and only the freeopencodemodels 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:
/modelswith new designs on (same cause, fixed by fix(tui): count config-only providers as connected #65793)/modelson v2.4.0 (same problem, closed as a duplicate of tui: /model picker empty ("No models are available") with a custom openai-compatible provider on 2.2.3 #60587)I'm closing this issue now as a duplicate of #60587. Please add any details there. If the models are still missing with
new-designsset tofalse, that's a different problem: reply here and this issue will reopen.