opencode icon indicating copy to clipboard operation
opencode copied to clipboard

OpenCode displays models which aren't configured & don't exist in LM Studio

Open jschmdt opened this issue 2 months ago • 5 comments

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

  1. Copied config example from https://opencode.ai/docs/providers/#lm-studio
  2. Added a custom model from LM Studio (gpt-oss-20b) in opencode.json
  3. Run opencode in Terminal
  4. Ctrl+x > m to list models
  5. Model list shows additional models: Qwen3 Coder 30B & Qwen3 30B A3B 2507 - the latter isn't even installed in LM Studio) (Screenshot Nr. 1)
  6. opencode.json doesn'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 Image

Screenshot Nr. 2 – Custom Models added in opencode.json Image

Operating System

macOS Tahoe 26.1

Terminal

iTerm 3.5.6 / Visual Studio Code 1.106.0-insider

jschmdt avatar Nov 12 '25 03:11 jschmdt

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.

github-actions[bot] avatar Nov 12 '25 03:11 github-actions[bot]

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

rekram1-node avatar Nov 12 '25 03:11 rekram1-node

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 😎✨

jschmdt avatar Nov 12 '25 05:11 jschmdt

yeah we could prolly do sometbing better for ollama and lmstudio users

rekram1-node avatar Nov 12 '25 05:11 rekram1-node

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.

agustif avatar Dec 18 '25 21:12 agustif