GLM-4.7-Flash not recognized as a local coding model in LM Studio provider #7972

Open
opened 2026-02-16 18:08:48 -05:00 by yindo · 8 comments
Owner

Originally created by @aperepel on GitHub (Jan 29, 2026).

Originally assigned to: @rekram1-node on GitHub.

Question

Hi, any reason why this one isn't listed in the discovered ones? It is supposed to be coding-centric, but only Qwen3 30B and GPT-OSS 20B are recognized (not 120B, not 80B, which is another oddity).

Originally created by @aperepel on GitHub (Jan 29, 2026). Originally assigned to: @rekram1-node on GitHub. ### Question Hi, any reason why this one isn't listed in the discovered ones? It is supposed to be coding-centric, but only Qwen3 30B and GPT-OSS 20B are recognized (not 120B, not 80B, which is another oddity).
yindo added the zen label 2026-02-16 18:08:48 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 29, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #11127: Zhipu coding plan does not have GLM-4.7-Flash model
  • #4232: OpenCode displays models which aren't configured & don't exist in LM Studio
  • #1555: LM Studio Missing as Provider, custom provider for LM Studio non-functional

These issues address similar problems with model discovery and recognition in LM Studio provider. Feel free to ignore if your specific case differs from these.

@github-actions[bot] commented on GitHub (Jan 29, 2026): This issue might be a duplicate of existing issues. Please check: - #11127: Zhipu coding plan does not have GLM-4.7-Flash model - #4232: OpenCode displays models which aren't configured & don't exist in LM Studio - #1555: LM Studio Missing as Provider, custom provider for LM Studio non-functional These issues address similar problems with model discovery and recognition in LM Studio provider. Feel free to ignore if your specific case differs from these.
Author
Owner

@cravenceiling commented on GitHub (Jan 29, 2026):

It's because that model is not in the models.dev database. This is the database used by opencode to fetch the provider/model data.

https://models.dev/?search=lmstudio

You can add it following the instructions: https://github.com/anomalyco/models.dev

@cravenceiling commented on GitHub (Jan 29, 2026): It's because that model is not in the models.dev database. This is the database used by opencode to fetch the provider/model data. https://models.dev/?search=lmstudio You can add it following the instructions: https://github.com/anomalyco/models.dev
Author
Owner

@aperepel commented on GitHub (Feb 4, 2026):

There's a much easier way, edit a local model list at ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "lmstudio": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "LM Studio (local)",
      "options": {
        "baseURL": "http://127.0.0.1:1234/v1"
      },
      "models": {
        "zai-org/glm-4.7-flash": {
          "name": "GLM-4.7 Flash (local)"
        },
        "qwen/qwen3-next-80b": {
          "name": "Qwen3 Next 80B"
        },
        "gpt-oss-120b": {
          "name": "GPT-OSS 120B"
        },
        "mistralai/devstral-small-2-2512": {
          "name": "Devstral Small 2.2512"
        },
        "gpt-oss-20b": {
          "name": "GPT-OSS 20B Local"
        },
        "qwen/qwen3-coder-30b": {
          "name": "Qwen3 Coder 30B"
        },
        "qwen/qwen3-coder-next": {
          "name": "Qwen3 Coder Next 80b"
        }

      }
    }
  }
}
@aperepel commented on GitHub (Feb 4, 2026): There's a much easier way, edit a local model list at `~/.config/opencode/opencode.json`: ``` { "$schema": "https://opencode.ai/config.json", "provider": { "lmstudio": { "npm": "@ai-sdk/openai-compatible", "name": "LM Studio (local)", "options": { "baseURL": "http://127.0.0.1:1234/v1" }, "models": { "zai-org/glm-4.7-flash": { "name": "GLM-4.7 Flash (local)" }, "qwen/qwen3-next-80b": { "name": "Qwen3 Next 80B" }, "gpt-oss-120b": { "name": "GPT-OSS 120B" }, "mistralai/devstral-small-2-2512": { "name": "Devstral Small 2.2512" }, "gpt-oss-20b": { "name": "GPT-OSS 20B Local" }, "qwen/qwen3-coder-30b": { "name": "Qwen3 Coder 30B" }, "qwen/qwen3-coder-next": { "name": "Qwen3 Coder Next 80b" } } } } } ```
Author
Owner

@martinoturrina commented on GitHub (Feb 11, 2026):

But why not hit v1/models to get all models available on lmstudio (or any other provider) and show that as a list?

@martinoturrina commented on GitHub (Feb 11, 2026): But why not hit v1/models to get all models available on lmstudio (or any other provider) and show that as a list?
Author
Owner

@R44VC0RP commented on GitHub (Feb 11, 2026):

@martinoturrina we pull all of our model lists from models.dev, that way we have a single source of truth

@R44VC0RP commented on GitHub (Feb 11, 2026): @martinoturrina we pull all of our model lists from models.dev, that way we have a single source of truth
Author
Owner

@martinoturrina commented on GitHub (Feb 11, 2026):

@R44VC0RP yeah I get that but for LMStudio, which is supposed to be an application to serve local models, you can run any huggingface model and more, so the list would be very long, and depend on which models the user has downloaded.

I think in this case it would really make sense to fetch v1/models, which is for example what openwebui does to list available models.

What do you think?

@martinoturrina commented on GitHub (Feb 11, 2026): @R44VC0RP yeah I get that but for LMStudio, which is supposed to be an application to serve local models, you can run any huggingface model and more, so the list would be very long, and depend on which models the user has downloaded. I think in this case it would really make sense to fetch v1/models, which is for example what openwebui does to list available models. What do you think?
Author
Owner

@aperepel commented on GitHub (Feb 11, 2026):

I don't necessarily agree with using models.dev as a definitive source of truth. It's not. Although it could be convenient (lazy?) for the opencode team to use.

The right UX is to fetch a list of hosted models from LM Studio (or any local provider, for that matter). Not every model would be a coding one and work well with OC, but that is a much better experience than defaulting to a hardcoded list. If anything, OC could cross-reference available vs 'vetted' model list, though it gets brittle quickly (so many archs and quants).

My take - be open and let the user select any available model from LM Studio. If the model fails or doesn't work well, it's on user.

@aperepel commented on GitHub (Feb 11, 2026): I don't necessarily agree with using models.dev as a definitive source of truth. It's not. Although it could be convenient (lazy?) for the opencode team to use. The right UX is to fetch a list of hosted models from LM Studio (or any local provider, for that matter). Not every model would be a coding one and work well with OC, but that is a much better experience than defaulting to a hardcoded list. If anything, OC could cross-reference available vs 'vetted' model list, though it gets brittle quickly (so many archs and quants). My take - be open and let the user select any available model from LM Studio. If the model fails or doesn't work well, it's on user.
Author
Owner

@rekram1-node commented on GitHub (Feb 11, 2026):

Yeah we will fetch from models list for these types of providers. The only downside is most models lists are missing a lot of info that we need to give u best experience

I think lmstudio and ollama serve enough info to populate a model definition tho.

@rekram1-node commented on GitHub (Feb 11, 2026): Yeah we will fetch from models list for these types of providers. The only downside is most models lists are missing a lot of info that we need to give u best experience I think lmstudio and ollama serve enough info to populate a model definition tho.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7972