Repository navigation
/model TUI picker does not display all custom provider models (models load correctly but don't appear in UI) #6169
Description
Description
Custom models defined in opencode.jsonc under custom providers are correctly loaded by OpenCode (verified via opencode models --verbose), but many of them do not appear in the /model TUI picker dialog.
Key observation: Models that have been used recently appear in the "Recent" section, proving they are functional. However, when scrolling through the provider sections in the picker, many models are missing from the list.
Evidence
Models loaded (via opencode models): 23 models across 3 providers
Models visible in /model picker: ~15 models (varies based on Recent section)
| Provider | Models in Config | Models in /model Picker |
Missing |
|---|---|---|---|
aistudio (custom) |
7 | 2 (+ some in Recent) | 5 |
myproxy (custom) |
12 | ~8 | ~4 |
opencode (built-in) |
4 | 4 | 0 |
Example missing models:
aistudio/gemini-2.5-pro- loads correctly, not in pickeraistudio/gemini-3-pro-preview- loads correctly, not in pickermyproxy/antigravity/claude-opus-4-5- loads correctly, not in picker
OpenCode version
1.0.201
Steps to reproduce
- Create a custom provider in
opencode.jsoncwith multiple models:
{
"provider": {
"myproxy": {
"npm": "@ai-sdk/openai-compatible",
"name": "My Custom Proxy",
"options": {
"baseURL": "http://127.0.0.1:8000/v1"
},
"models": {
"model-a": { "name": "Model A", "limit": { "context": 100000, "output": 8192 } },
"model-b": { "name": "Model B", "limit": { "context": 100000, "output": 8192 } },
"model-c": { "name": "Model C", "limit": { "context": 100000, "output": 8192 } },
"model-d": { "name": "Model D", "limit": { "context": 100000, "output": 8192 } },
"model-e": { "name": "Model E", "limit": { "context": 100000, "output": 8192 } },
"model-f": { "name": "Model F", "limit": { "context": 100000, "output": 8192 } },
"model-g": { "name": "Model G", "limit": { "context": 100000, "output": 8192 } }
}
}
}
}- Run
opencode modelsto verify all models are loaded correctly - Launch OpenCode TUI and type
/model - Scroll through the provider section - observe that not all models appear
Expected behavior
All models returned by opencode models should be visible in the /model TUI picker under their respective provider sections.
Actual behavior
Only a subset of custom provider models appear in the picker. The missing models:
- Are correctly parsed and loaded (confirmed via
opencode models --verbose) - Work correctly when set as
"model"in config - Appear in "Recent" section after being used
- Simply don't render in the provider list of the
/modeldialog
Workaround
You can still use missing models by:
- Setting them directly in config:
"model": "myproxy/model-name" - Using them once, then selecting from "Recent" section
Screenshot and/or share link
Operating System
Windows 10 (Build 22631)
Terminal
Windows Terminal / VS Code Integrated Terminal
Additional context
Potentially related code: The model picker is implemented in packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx. The filtering logic intentionally removes models that are in "Recent" or "Favorites" to avoid duplication, but there may be an additional issue causing other models to not render.
Debug info:
- All 23 models load correctly via Provider.list()
- The sync.data.provider array contains all providers and models
- Issue appears to be in the TUI rendering/display layer, not config parsing
Activity
github-actions commentedon Dec 25, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
MasuRii commentedon Dec 25, 2025
It's working now, I deleted the models in C:\Users\Administrator.local\state\opencode, as somehow that's the one causing issue. Is there a way to avoid this in the future please? so that I wont have to keep deleting the state.
pablonification commentedon Dec 26, 2025
this happens on my opencode too, try to debug this for a hour to finding out it's a global issue.
to fix, im deleting the model.json from /Users/macbook/.local/state/opencode/model.json then suddenly it works lmao
tqian86 commentedon Dec 26, 2025
On Linux, the equivalent file is ~/.cache/opencode/models.json, but deleting it has no effect. The models are still missing from the pick TUI.
peaster commentedon Dec 27, 2025
Reproduced this and confirmed that deleting
~/.cache/opencode/models.jsonhas no effect on LinuxMasuRii commentedon Dec 27, 2025
@tqian86
@peaster
Try looking for the "state" folder, as I also tried to delete that in the .cache and it's not working, that's not the correct folder.
akirabaruah commentedon Dec 28, 2025
I'm on a Mac. I initially tried deleting
models.jsonunder~/.cache/, which didn't work:But based on #6169 (comment) and #6169 (comment), I tried deleting the file under
~/.local/instead, which fixed the issue for me:Thanks @MasuRii 🙏
rekram1-node commentedon Dec 28, 2025
This is the same issue as this:
#6251 (comment)
there was a bug w/ the recents list for model picker. Added a fix for it, will be in next release
chindris-mihai-alexandru commentedon Dec 30, 2025
This issue still persists in v1.0.218.
My setup:
Configuration:
Custom Bedrock provider with 4 models configured in
opencode.json:{ "provider": { "bedrock": { "npm": "@ai-sdk/amazon-bedrock", "name": "Amazon Bedrock", "options": { "region": "us-east-1" }, "models": { "us.anthropic.claude-opus-4-5-20251101-v1:0": { "name": "Claude Opus 4.5 (Best)" }, "us.anthropic.claude-sonnet-4-5-20250929-v1:0": { "name": "Claude Sonnet 4.5 (Balanced)" }, "us.anthropic.claude-sonnet-4-20250514-v1:0": { "name": "Claude Sonnet 4 (Legacy)" }, "us.anthropic.claude-haiku-4-5-20251001-v1:0": { "name": "Claude Haiku 4.5 (Fast)" } } } } }Behavior:
/modelspicker shows: Claude Opus 4.5, Claude Sonnet 4.5, Claude Sonnet 4 (and other built-in Bedrock models)/modelspicker missing: Claude Haiku 4.5 (Fast) - my custom-named model/models, I see TWO entries in "Recent":Observations:
This appears to be an incomplete fix - custom models with names similar to built-in models may be getting filtered/hidden incorrectly.
Thijxx commentedon Apr 3, 2026
still broken in 1.3.13
shows models that are not existing
does not show models that are there
picks a random name for models
completely cuucuu
droud-dev commentedon Jun 8, 2026
Still an issue. Especially with custom providers - my LiteLLM proxy doesn't even show up in the list of
/models, even after purging.local,.cache, deleteing and re-adding, etc.ahmedfaaid commentedon Jun 26, 2026
This is still an issue with 1.17.1. I don't get the full list of models with the NVIDIA provider.
jhelm commentedon Sep 26, 2026
This issue is still present in version 1.18.32. (MacOS 26.6.2 on a M3 Max with 64GB Ram)