[Bug]: Cannot add LMstudio provider and models
Summary
I am not sure if I am successfully added LMstudio as a provider
but I cannot find the Gemma 4 model under the list
To Reproduce
- add "lmstudio" as a connect provider with "lm-studio" as API key
- Change the default model
- find "gemma 4"
Expected behavior
I expect to find the "Gemma 4" model since my LMStudio is running properly
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
thanks, finally i used the prompt (by default model) to setup by itself and it works.
Glad its resolved 🫡