You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
desktop: a provider disappears from /models once all its models are in Recent / 桌面版:某 provider 的模型全部进入「最近使用」后,该分组从 /models 中消失 #60267
EN — Once every model of a provider has been used, that provider's group vanishes from the desktop model picker completely: no header, no rows. It reads as if the provider was removed from the config. Typing anything in the search box brings the group back.
The Recent list is capped at 5 entries (I = 5), so any provider with ≤5 models disappears after ordinary use.
「最近使用」上限为 5 条(I = 5),因此模型数 ≤5 的 provider 在正常使用后必然消失。
Search bypasses the whole path — f.search.trim() ? e : Ka({ ... }) — which is why the group reappears while typing.
搜索会跳过这段逻辑——f.search.trim() ? e : Ka({ ... })——这就是输入关键词后分组重新出现的原因。
Expected / 预期
The provider keeps its group with all models listed; Recent is an additional shortcut, not a relocation.
provider 分组保持完整列出所有模型;「最近使用」是额外的快捷入口,而不是把模型搬走。
Impact / 影响
Custom and local OpenAI-compatible providers are usually small (1–5 models), so they disappear after normal use and look like data or config loss.
自定义和本地 OpenAI 兼容 provider 通常模型很少(1–5 个),因此正常使用后就会消失,看起来像数据或配置丢失。
Related / 相关
#45821 (closed 2026-10-28 by the stale bot, which asked for a new issue if still relevant) · #49141 · #40592 · #3874
Plugins
None
OpenCode version
2.2.1 (desktop app, @opencode-aidesktop)
Steps to reproduce
Configure a custom provider with 2 models (below reproduced the bug with 2).
Thanks for the detailed write-up and the clear explanation of how it happens.
You're asking for the desktop /models picker to keep every provider group complete, with Recent (and Favorites) as extra shortcuts rather than moving models out of their provider. That way small custom or local providers don't disappear from the list after normal use.
From the code, the current behaviour is intentional. The picker removes favorite and recent models from their provider group so no model is listed twice, as in the TUI. A provider whose models are all in Recent is left with no rows, so its group isn't shown. Your models aren't lost, though: they're still under Recent, and the full group comes back when you search. So I've marked this as a feature request rather than a bug. Maintainers will consider it.
Still reproducible on 2.4.0 (latest) in the TUI on Linux, with a provider that has only two models — which makes it look like the model was deleted from the config:
Provider deepseek exposes deepseek-flash and deepseek-v4-pro.
deepseek-flash is recent[0] in ~/.local/state/opencode/model.json.
Opening /models with an empty search shows the Recent section with "DeepSeek V4.1 Flash 1017", while the DeepSeek group only lists "DeepSeek V4 Pro".
Typing anything into the search field makes the missing model appear again.
The data layer is fine — GET /api/model on 2.4.0 returns both models for the same location:
The TUI model dialog in the 2.4.0 build still subtracts instead of copies: when the search filter is empty and no provider is preselected, any model whose providerID/modelID is in favorites or recent is dropped from its provider group. Favorites behave the same way, and a group left with zero rows disappears entirely (as described above).
Practical impact: on a small provider (2 models) one of them vanishes after normal use, and the same model can be selected twice in a row from two different looking places. This is the same confusion the desktop reports describe, so the TUI is affected identically.
Request (in line with the rest of this issue): keep provider groups complete and render Recent/Favorites as an additional shortcut, or add a setting to disable the de-duplication — either is fine, a model just should not disappear from its provider group.
Note: #64638 and #64196 were closed as duplicates of this issue, so I'm adding the TUI/2.4.0 reproduction here instead of opening another report.
Activity
opencodejr commentedon Oct 29, 2026
Thanks for the detailed write-up and the clear explanation of how it happens.
You're asking for the desktop
/modelspicker to keep every provider group complete, with Recent (and Favorites) as extra shortcuts rather than moving models out of their provider. That way small custom or local providers don't disappear from the list after normal use.From the code, the current behaviour is intentional. The picker removes favorite and recent models from their provider group so no model is listed twice, as in the TUI. A provider whose models are all in Recent is left with no rows, so its group isn't shown. Your models aren't lost, though: they're still under Recent, and the full group comes back when you search. So I've marked this as a feature request rather than a bug. Maintainers will consider it.
The same thing has been requested before:
/models(closed as a duplicate of [FEATURE]: Copy models into Recent/Favourites instead of moving #45821)This can't be done with a plugin today, because plugins have no way to change how the desktop model picker groups its list.
734208213 commentedon Nov 5, 2026
这确实有点反直觉,我以为是bug,原来是有意为之
ko22009 commentedon Nov 9, 2026
up
amirsaam commentedon Nov 18, 2026
+1
As described in #64638, at least you could give us an option to disable Recent Models completely
Bopp77 commentedon Nov 23, 2026
Still reproducible on 2.4.0 (latest) in the TUI on Linux, with a provider that has only two models — which makes it look like the model was deleted from the config:
deepseekexposesdeepseek-flashanddeepseek-v4-pro.deepseek-flashisrecent[0]in~/.local/state/opencode/model.json./modelswith an empty search shows the Recent section with "DeepSeek V4.1 Flash 1017", while the DeepSeek group only lists "DeepSeek V4 Pro".The data layer is fine —
GET /api/modelon 2.4.0 returns both models for the same location:{"providerID":"deepseek","id":"deepseek-flash","name":"DeepSeek V4.1 Flash 1017","status":"active"} {"providerID":"deepseek","id":"deepseek-v4-pro","name":"DeepSeek V4 Pro","status":"active"}The TUI model dialog in the 2.4.0 build still subtracts instead of copies: when the search filter is empty and no provider is preselected, any model whose
providerID/modelIDis in favorites or recent is dropped from its provider group. Favorites behave the same way, and a group left with zero rows disappears entirely (as described above).Practical impact: on a small provider (2 models) one of them vanishes after normal use, and the same model can be selected twice in a row from two different looking places. This is the same confusion the desktop reports describe, so the TUI is affected identically.
Request (in line with the rest of this issue): keep provider groups complete and render Recent/Favorites as an additional shortcut, or add a setting to disable the de-duplication — either is fine, a model just should not disappear from its provider group.
Note: #64638 and #64196 were closed as duplicates of this issue, so I'm adding the TUI/2.4.0 reproduction here instead of opening another report.
neriousy commentedon Nov 23, 2026
The picker moves Recent and Favorite models out of their provider groups on purpose to avoid listing them twice. Closing.
amirsaam commentedon Nov 23, 2026
@neriousy Give us an option to disable this behaviour at least on demand, default is yours but users may want otherwise!