Skip to content

[FEATURE]: mutiple servers of the same local provider (llama.cpp, vllm, etc) #51675

Closed

Description

@xxfatumxx

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I have mutiple llama.cpp servers configured: one is local on my laptop and another on AI workstation in my home network. So when I try to use config like this:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "dash-api": {
      "type": "local",
      "command": ["uvx", "--from", "git+https://github.com/Kapeli/dash-mcp-server.git", "dash-mcp-server"],
      "enabled": true
    }
  },
  "plugin": ["superpowers@git+https://github.com/obra/superpowers.git", "@mohak34/[email protected]"],
  "provider": {
    "llama.cpp": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "llama-server (local)",
      "options": {
        "baseURL": "http://127.0.0.1:8080/v1"
      },
      "models": {
        "qwen3-6-27b": {
          "name": "Qwen3.6: 27b (local)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "qwen3-8-27b-medium": {
          "name": "Qwen3.8: 27b (medium) (local)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "qwen3-8-27b-xhigh": {
          "name": "Qwen3.8: 27b (xhigh) (local)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "qwen3-6-27b-mtp": {
          "name": "Qwen3.6: 27b MTP (local)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "qwen3-6-35b-a3b-mtp-thinking": {
          "name": "Qwen3.6: 35B-A3B MTP (local)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "qwen3-6-27b-nr": {
          "name": "Qwen3.6: 27b no-reasoning (local)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "qwen3-6-35b-a3b": {
          "name": "Qwen3.6: a3b-35b (local)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "qwen3-6-35b-a3b-thinking": {
          "name": "Qwen3.6: a3b-35b thinking (local)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "kat-coder-2.5-dev": {
          "name": "KAT Coder 2.5 Dev (local)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "gemma-4-26b-a4b": {
            "name": "Gemma4: 26b-a4b (local)",
            "limit": {
              "context": 128000,
              "output": 65536
            }
          },
          "gemma-diffusion": {
            "name": "Gemma: Diffusion (local)",
            "limit": {
              "context": 128000,
              "output": 65536
            }
          }
      }
    },
    "llama.cpp": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "llama-server (ai-ws)",
      "options": {
        "baseURL": "http://xxfatumxx-ai-ws.local:8080/v1"
      },
      "models": {
        "qwen3-8-27b-6-k-m": {
          "name": "Qwen3.8: 27b (6-bit) (ai-ws)",
          "limit": {
            "context": 128000,
            "output": 64000
          }
        },
        "qwen3-8-27b-4-k-xl": {
          "name": "Qwen3.8: 27b (4-bit) (ai-ws)",
          "limit": {
            "context": 262144,
            "output": 128000
          }
        },
        "qwen3-6-35b-a3b": {
          "name": "Qwen3.6: 35B-A3B (ai-ws)",
          "limit": {
            "context": 262144,
            "output": 128000
          }
        },
        "gemma-4-31b": {
            "name": "Gemma4: 31b (ai-ws)",
            "limit": {
              "context": 262144,
              "output": 128000
            }
        },
        "gpt-oss-20b": {
            "name": "GPT-OSS: 20b (ai-ws)",
            "limit": {
              "context": 128000,
              "output": 64000
            }
        }
      }
    }
  }
}

It loads only ONE of them (last configured), so now I just commenting out the one I don't use to make other work, which is inconvenient.

Is there any way to make opencode configuration support multiple servers of the same local provider? I haven't tested it on vllm or sglang but I think they will have the same problem.

Activity

  1. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor

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

  2. xxfatumxx commented on Sep 27, 2026

    @xxfatumxx
    Author

    Found workaround by using custom provider logic so if you rename llama.cpp into let's say llama-ai-ws /models command now sees models from both servers. If there is no resource/intention to add extra functionality I guess the issue can be closed.

  3. programmin1 commented on Oct 6, 2026

    @programmin1

    There really should be easy way to set up a local AI - no internet or account required!

  4. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for following up. You confirmed that giving each server a distinct provider ID makes models from both servers available, which is supported by the custom-provider configuration. I'm closing this as resolved.

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