Repository navigation
Description
Summary
The TUI model dialog omits one model from a provider's group even though the
model is present in the server catalog (/api/model) and selectable via search.
With a provider exposing three models, only two are listed under the provider
heading; the third can only be found by typing in the search field.
Environment
- opencode version: 2.3.0 (
opencode v2.3.0, Homebrewopencode-v2/2.3.0) - OS: macOS 27.0.0, Darwin 27.0.0 arm64 (
RELEASE_ARM64_T6041) - Terminal: Ghostty (
TERM_PROGRAM=ghostty,TERM=xterm-256color,COLORTERM=truecolor) - Shell:
/bin/zsh - Install/channel: Homebrew release build (
/opt/homebrew/Cellar/opencode-v2/2.3.0/bin/opencode), TUI and background service are the same binary - Active plugins:
./plugins/ollama-models(local),./plugins/searxng(local),superpowers@git+https://github.com/obra/superpowers.git#v7.0.1
Reproduction
- Configure an OpenAI-compatible provider with three models, e.g. an Ollama
server on the LAN that reportsqwen3.8:27b-mlx,bonsai-2:27b,
gemma4:26b-mlxfrom/v1/models. - Declare the three models explicitly in
opencode.jsonunder
providers.<id>.models(identicalid/name,capabilities.tools: true,
input: ["text","image"],output: ["text"]). - Confirm the server-side catalog contains all three
(GET /api/model→ 3 entries withproviderID: "localAIserver",
status: "active",enabled: true). - Open the TUI model dialog and look under the provider heading
"Local AI Server". - Observe only
bonsai-2:27bandgemma4:26b-mlx. Type part of
qwen3.8in the search field →qwen3.8:27b-mlxappears and can be selected
and used.
Expected Behavior
All three provider models are listed under the "Local AI Server" heading, in the
same way search shows them.
Actual Behavior
qwen3.8:27b-mlx is missing from the provider group. It is not hidden by a
config field (no hidden/status/disabled on the model), and it is fully
present in the catalog:
{
"id": "qwen3.8:27b-mlx",
"modelID": "qwen3.8:27b-mlx",
"providerID": "localAIserver",
"name": "qwen3.8:27b-mlx",
"capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] },
"variants": [],
"status": "active",
"enabled": true,
"limit": { "context": 200000, "output": 32000 }
}Additional Context
Consistently reproducible (not intermittent). Restarting the TUI and running
/reload did not change it; declaring the models in opencode.json instead of
relying on a plugin provider.transform did not change it either.
Provider config (no secrets):
"localAIserver": {
"name": "Local AI Server",
"package": "@opencode/ai/providers/openai-compatible",
"settings": { "baseURL": "http://<lan-host>:11434/v1" },
"models": {
"qwen3.8:27b-mlx": { "name": "qwen3.8:27b-mlx", "capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] } },
"bonsai-2:27b": { "name": "bonsai-2:27b", "capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] } },
"gemma4:26b-mlx": { "name": "gemma4:26b-mlx", "capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] } }
}
}GET /api/provider/localAIserver returns the provider without a models array,
while GET /api/model lists all three — so the dialog and the catalog disagree.
Possible trigger worth checking in the dialog logic: qwen3.8:27b-mlx is the
only one of the three that appears in ~/.local/state/opencode/model.json under
recent:
{"providerID":"localAIserver","modelID":"qwen3.8:27b-mlx"}The same file also holds stale references, e.g. {"providerID":"ollama", "modelID":"gemma4:26b-mlx"} for a model that only exists under localAIserver.
Suspicion: the dialog de-duplicates provider-group entries against
recent/favorite keys and, for a key that resolves to a different provider (or
for IDs containing : / .), drops the entry from the provider group without
rendering it in the recents group.
Workaround: search for the model name in the dialog.
Activity
aregander commentedon Nov 16, 2026
Additional confirmation (2026-11-17): the model dialog shows the "Local AI Server" group with only
bonsai-2:27bandgemma4:26b-mlx. This is still the case after declaring all three models explicitly underproviders.localAIserver.modelsinopencode.jsonand reloading;GET /api/modelcontinues to returnqwen3.8:27b-mlxfor the same provider withstatus: activeandenabled: true. A screenshot of the dialog has been captured by the reporter.opencodejr commentedon Nov 16, 2026
Thanks for the detailed report, and for pointing at
recentinmodel.json. That's what explains it.I think this is a duplicate of #60267. When the search box is empty, the TUI model dialog shows Favorites and Recent sections at the top. Any model listed there is taken out of its provider group, so it isn't shown twice.
qwen3.8:27b-mlxis the only one of your three models inrecentforlocalAIserver, so it should appear under Recent at the top of the list rather than under Local AI Server. Typing a search turns those sections off, which is why the model shows up under its provider again then. This is how the dialog is built at the moment, and #60267 asks for provider groups to always list every model.Possible duplicates and related issues, ordered by likelihood:
/modelsdialog, closed as a duplicate of desktop: a provider disappears from /models once all its models are in Recent / 桌面版:某 provider 的模型全部进入「最近使用」后,该分组从 /models 中消失 #60267I'm closing this issue now as a duplicate of #60267. Please add your details there. If
qwen3.8:27b-mlxdoesn't appear anywhere in the dialog with the search box empty (not under Recent either), that's a different problem. In that case, reply here with a screenshot of the whole list, scrolled from top to bottom, and the issue will reopen.opencodejr commentedon Nov 16, 2026
Thanks for checking again. What you describe under Local AI Server is what we'd expect, though. With the search box empty, the dialog takes any model listed in Recent or Favorites out of its provider group. Declaring the models in
opencode.jsonor reloading doesn't change that.qwen3.8:27b-mlxis in yourrecentlist, so it should appear in the Recent section at the top of the dialog instead.The one thing that decides whether this is a bug is:
qwen3.8:27b-mlxlisted under Recent (or Favorites)?If it is, the dialog is working as designed, and #60267 tracks the request to keep provider groups complete. If it isn't listed anywhere with the search empty, please attach the screenshot you mentioned (it didn't come through in the comment), showing the whole list from the top. Then we'll treat it as a bug and look into it.