LM Studio Missing as Provider, custom provider for LM Studio non-functional. #1074

Open
opened 2026-02-16 17:29:23 -05:00 by yindo · 4 comments
Owner

Originally created by @arlogilbert on GitHub (Aug 3, 2025).

Originally assigned to: @thdxr on GitHub.

Ubuntu 25 Wayland Kernel 6.14.0-27-generic
Opencode version 0.3.113
LM Studio API is:

  • Responding to HTTP requests
  • Accepting the API key "lm-studio"
  • Serving the OpenAI-compatible endpoints (/v1/models tested)

Expected behavior: LM Studio is available as a provider and may be selected when running opencode auth.
Actual behavior: LM Studio is not listed as an option in the provider selection dialogs.

Given that LM Studio is not an option, I then configured LM Studio using the "Other" option with opencode auth. No other providers are configured. auth.json appears valid and ~/.opencode/opencode.json meets the spec for opencode.json per docs (both files contents shared below).

Expected behavior: opencode uses the new "lmstudio" custom provider.
Actual behavior: opencode will not load any dialogs except for the auth dialog, meaning that just launching opencode as normal always takes me to an auth dialog.

If opencode.json is placed in the project folder, it works fine, but docs say I can have a global opencode.json

Contents of ~/.local/share/opencode/auth.json

{
  "lmstudio": {
    "type": "api",
    "key": "lm-studio"
  }
}

Contents of ~/.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": {
        "qwen/qwen3-coder-30b": {
          "name": "Qwen 3 Coder 30B"
        }
      }
    }
  }
}
Originally created by @arlogilbert on GitHub (Aug 3, 2025). Originally assigned to: @thdxr on GitHub. Ubuntu 25 Wayland Kernel 6.14.0-27-generic Opencode version 0.3.113 LM Studio API is: - Responding to HTTP requests - Accepting the API key "lm-studio" - Serving the OpenAI-compatible endpoints (/v1/models tested) Expected behavior: LM Studio is available as a provider and may be selected when running `opencode auth`. Actual behavior: LM Studio is not listed as an option in the provider selection dialogs. Given that LM Studio is not an option, I then configured LM Studio using the "Other" option with `opencode auth`. No other providers are configured. auth.json appears valid and ~/.opencode/opencode.json meets the spec for opencode.json per docs (both files contents shared below). Expected behavior: opencode uses the new "lmstudio" custom provider. Actual behavior: opencode will not load any dialogs except for the auth dialog, meaning that just launching opencode as normal always takes me to an auth dialog. If opencode.json is placed in the project folder, it works fine, but docs say I can have a global opencode.json Contents of ~/.local/share/opencode/auth.json ```json { "lmstudio": { "type": "api", "key": "lm-studio" } } ``` Contents of ~/.opencode/opencode.json ```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": { "qwen/qwen3-coder-30b": { "name": "Qwen 3 Coder 30B" } } } } } ```
Author
Owner

@thdxr commented on GitHub (Aug 3, 2025):

i'm not following - lm studio requires custom config like our docs say, is something broken?

@thdxr commented on GitHub (Aug 3, 2025): i'm not following - lm studio requires custom config like our docs say, is something broken?
Author
Owner

@RodriMora commented on GitHub (Aug 4, 2025):

i'm not following - lm studio requires custom config like our docs say, is something broken?

I believe the problem/bug comes from using the global opencode.json at ~/.opencode/opencode.json as it's not working.
But the local opencode.json place in the projet folder works. I just tested and this is the behaviour, local folder works, global config file does not work

@RodriMora commented on GitHub (Aug 4, 2025): > i'm not following - lm studio requires custom config like our docs say, is something broken? I believe the problem/bug comes from using the global opencode.json at ~/.opencode/opencode.json as it's not working. But the local opencode.json place in the projet folder works. I just tested and this is the behaviour, local folder works, global config file does not work
Author
Owner

@Philosoph89 commented on GitHub (Aug 4, 2025):

Configured LM Studio locally without problems

EDIT: global ;-)

@Philosoph89 commented on GitHub (Aug 4, 2025): Configured LM Studio locally without problems EDIT: global ;-)
Author
Owner

@Nindaleth commented on GitHub (Dec 25, 2025):

Here's my config that I'm using without any issues:

~/.config/opencode/opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "llama-cpp": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "llama.cpp",
      "options": {
        "baseURL": "http://192.168.1.190:1234/v1"
      },
      "models": {
        "qwen3-coder-30b": {
          "name": "Qwen3-Coder-30B-A3B-Instruct: UD_Q4_K_XL (local)",
          "limit": {"context": 50000, "output": 50000}
        },
        "devstral-small-2-24b": {
          "name": "Devstral-Small-2-24B-Instruct-2512: UD-Q4_K_XL (local)",
          "limit": {"context": 60000, "output": 60000}
        }
      }
    }
  }
}

call opencode auth login -> Other -> type in "llama-cpp", enter API key, everything set up correctly

~/.local/share/opencode/auth.json

{
  "llama-cpp": {
    "type": "api",
    "key": "my-secret-key"
  }
}

The only valid point I guess is this, llama-cpp is not suggested in "Other" provider menu despite being present in config:

[custom provider] not listed as an option in the provider selection dialogs.

@Nindaleth commented on GitHub (Dec 25, 2025): Here's my config that I'm using without any issues: `~/.config/opencode/opencode.json` ``` { "$schema": "https://opencode.ai/config.json", "provider": { "llama-cpp": { "npm": "@ai-sdk/openai-compatible", "name": "llama.cpp", "options": { "baseURL": "http://192.168.1.190:1234/v1" }, "models": { "qwen3-coder-30b": { "name": "Qwen3-Coder-30B-A3B-Instruct: UD_Q4_K_XL (local)", "limit": {"context": 50000, "output": 50000} }, "devstral-small-2-24b": { "name": "Devstral-Small-2-24B-Instruct-2512: UD-Q4_K_XL (local)", "limit": {"context": 60000, "output": 60000} } } } } } ``` call `opencode auth login` -> Other -> type in "llama-cpp", enter API key, everything set up correctly `~/.local/share/opencode/auth.json` ``` { "llama-cpp": { "type": "api", "key": "my-secret-key" } } ``` The only valid point I guess is this, llama-cpp is not suggested in "Other" provider menu despite being present in config: > [custom provider] not listed as an option in the provider selection dialogs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1074