OpenCode displays models which aren't configured & don't exist in LM Studio
Description
I configured the opencode.json to work with LM Studio. And made sure to delete all opencode files under .local beforehand to have a clean init and config.
I used the config example provided https://opencode.ai/docs/providers/#lm-studio
When I added my custom model, launched LM Studio and ran OpenCode in Terminal, the model list shows additional models which aren't configured in my opencode.json. The other configured models show up with the right name (as defined in the .json) and can be loaded successfully. See screenshots & steps to reproduce or further details.
Where do the other model
OpenCode version
1.0.58 (brew, macOS)
Steps to reproduce
- Copied config example from https://opencode.ai/docs/providers/#lm-studio
- Added a custom model from LM Studio (gpt-oss-20b) in
opencode.json - Run
opencodein Terminal - Ctrl+x > m to list models
- Model list shows additional models: Qwen3 Coder 30B & Qwen3 30B A3B 2507 - the latter isn't even installed in LM Studio) (Screenshot Nr. 1)
opencode.jsondoesn't contain neither Qwen3 Coder 30B or Qwen3 30B A3B 2507 (Screenshot Nr. 2)
Screenshot and/or share link
Screenshot Nr. 1 – Select Model in OpenCode 1.0.58
Screenshot Nr. 2 – Custom Models added in opencode.json
Operating System
macOS Tahoe 26.1
Terminal
iTerm 3.5.6 / Visual Studio Code 1.106.0-insider
This issue might be a duplicate of existing issues. Please check:
- #2456: Reports similar problem with LM Studio model list displaying incorrect models that don't match configuration
Feel free to ignore if none of these address your specific case.
This is because models.dev the api we own that we keep track of models with, has some models listed for the lm studio provider so they are auto populated for you
Could we have an option to disable auto-populate, or have it disabled by default? It would be clearer for me as a user if only the models defined in the opencode.json file were listed. For example, I’d prefer not to have models like “Qwen3 30B A3B 2507” automatically added to keep it in sync with my own config.
On the other hand: I actually like the idea of an auto-populate feature (using GETv1/models). But if it’s enabled, it should at least list all models I have installed in LM Studio, rather than models that appear based on unclear criteria. I can imagine a group of users who would enjoy experimenting with or benchmarking multiple code models side by side. So having both modes available would cover both use cases 😎✨
yeah we could prolly do sometbing better for ollama and lmstudio users
yeah we could prolly do sometbing better for ollama and lmstudio users
my lmstudio plugin auto-discovers models could maybe add this to core for lmstudio provider and add them to config at runtime
https://github.com/agustif/opencode-lmstudio
and make a similar opencode-ollama plugin
also another idea (not implemented yet) is to be able to download reusing lms sdk or cli if you have a model configured in config but not downloaded, ask you if you want to download it and do so.