anomalyco / anomalyco/opencode
Custom provider models missing from /model TUI picker provider sections in 1.18.10 — caused by recents filter
@kommander is already working on this.
Since Aug 5, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
Custom provider models are still missing from the provider sections of the /model TUI picker in 1.18.10, even though they load correctly. This reproduces the symptoms of closed issues #6169 / #9520 and adds evidence for the root cause: models that appear in the picker's "Recent" list are filtered out of their provider section.
Environment
- opencode 1.18.10 (installed via Homebrew, macOS, darwin arm64)
- Config: two custom providers (
deepseek,minimax) using"npm": "@ai-sdk/anthropic"withbaseURL+apiKey - No project-level config; global
~/.config/opencode/opencode.json
Reproduction
- Define custom providers with models in
~/.config/opencode/opencode.json:
{
"provider": {
"deepseek": {
"npm": "@ai-sdk/anthropic",
"options": { "apiKey": "...", "baseURL": "https://example.com" },
"models": { "deepseek-v4-flash": { "name": "deepseek-v4-flash" } }
},
"minimax": {
"npm": "@ai-sdk/anthropic",
"options": { "apiKey": "...", "baseURL": "https://example.com" },
"models": { "MiniMax-M3": { "name": "minimax-m3" } }
}
}
}
opencode models— all custom models are listed correctly (verified):deepseek/deepseek-v4-flash,minimax/MiniMax-M3.- Open the TUI, invoke
/model— the custom provider sections show only models.dev built-in models (deepseek/deepseek-chat,deepseek/deepseek-reasoner,deepseek/deepseek-v4-pro,minimax/MiniMax-M2, ...). The configured custom models are absent from their provider sections. - Typing a search query in the picker does find the custom model; selecting it works and it appears under "Recent".
Root-cause evidence
~/.local/state/opencode/model.json (~/.cache/opencode/models.json on Linux) contains the recents/favorites state. Once a custom model is used and lands in "recent", it disappears from its provider section in the picker — matching the filtering logic that motivated the fix in #15025 (show models in provider section even when in recents/favorites), which is evidently incomplete for this case.
Workaround that confirms the mechanism: deleting ~/.local/state/opencode/model.json (backup first) temporarily restores all custom models to their provider sections. The bug recurs as soon as the model is used again and re-enters recents.
Expected behavior
Every model reported by opencode models (including custom provider models in recents/favorites) should be visible in the /model picker under its provider section.
Actual behavior
Custom provider models are only reachable via search results and the Recent section; they are absent from the provider group listings.
Workarounds (for other users)
- Delete
~/.local/state/opencode/model.json(macOS) /~/.cache/opencode/models.json(Linux) to restore provider-section visibility temporarily. - Set
"model": "provider/model-id"in config to make a custom model the session default without touching the picker. - Use picker search — custom models are still selectable there.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.