Skip to content

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

Closed as not planned

Description

@arlogilbert

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"
        }
      }
    }
  }
}

Activity

  1. self-assigned this
    on Aug 3, 2025
  2. thdxr commented on Aug 3, 2025

    @thdxr
    Member

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

  3. RodriMora commented on Aug 4, 2025

    @RodriMora

    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

  4. Philosoph89 commented on Aug 4, 2025

    @Philosoph89

    Configured LM Studio locally without problems

    EDIT: global ;-)

  5. Nindaleth commented on Dec 25, 2025

    @Nindaleth
    Contributor

    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.

  6. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  7. cdvankammen commented on Apr 29, 2026

    @cdvankammen

    I am confused why this remotely asks for an API key for LM studio in the config menu of the terminal, there is often times no need for lm studio to require one nore is there an otpion for this to allow me to use an actual lm studio instance???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions