openwork icon indicating copy to clipboard operation
openwork copied to clipboard

[Bug]: Cannot add LMstudio provider and models

Open patrickkernalcogel-pixel opened this issue 7 months ago • 3 comments

Summary

I am not sure if I am successfully added LMstudio as a provider

Image

but I cannot find the Gemma 4 model under the list

Image

To Reproduce

  1. add "lmstudio" as a connect provider with "lm-studio" as API key
  2. Change the default model
  3. find "gemma 4"

Expected behavior

I expect to find the "Gemma 4" model since my LMStudio is running properly

Image

Actual behavior

the lmstudio seems not connecting with openwork or the models cannot be loaded

Screenshots (optional)

No response

OW version & Desktop info (optional)

No response

Additional context (optional)

No response

You're using this locally in your desktop, correct? I believe this might be to gemma-4 not showing up in our version of opencode. You'd actually have to add it as a custom provider inside your .opencode config.

Can you give the snippet below a try to see if it works:

{
  "id": "lmstudio",
  "name": "LM Studio",
  "npm": "@ai-sdk/openai-compatible",
  "env": [],
  "doc": "https://lmstudio.ai/docs",
  "api": "http://localhost:1234/v1",
  "models": [
    {
      "id": "google/gemma-4-26b-a4b",
      "name": "Gemma 4 26B",
      "attachment": false,
      "reasoning": false,
      "tool_call": true,
      "structured_output": true,
      "temperature": true,
      "release_date": "2025-06-25",
      "last_updated": "2025-06-25",
      "open_weights": true,
      "limit": {
        "context": 32768,
        "input": 32768,
        "output": 8192
      },
      "modalities": {
        "input": ["text", "image"],
        "output": ["text"]
      }
    }
  ]
}

Tutorial: https://openworklabs.com/docs/how-to-connect-a-custom-provider

jcllobet avatar Apr 13 '26 18:04 jcllobet

thanks, finally i used the prompt (by default model) to setup by itself and it works.

Glad its resolved 🫡

src-opn avatar Apr 15 '26 20:04 src-opn