opencode-copilot-chat icon indicating copy to clipboard operation
opencode-copilot-chat copied to clipboard

Feature Request: Custom API Endpoint

Open AABoyles opened this issue 5 months ago • 3 comments

I'd like to use this extension with a self-hosted model. Seems like it should be a light lift to parameterize the API endpoint to enable this.

AABoyles avatar Jun 05 '26 03:06 AABoyles

If your local model is ollama compatible you can just use the ollama provider, or use the custom end point from the VSCode... What this extension will bring to you that you cant using the native implementation? I'm missing something?

Wallacy avatar Jun 07 '26 22:06 Wallacy

for self-hosted model, you can connect it directly from vscode.

primadis avatar Jun 11 '26 07:06 primadis

@AABoyles you can already do this via VS Code's native Custom Endpoint provider, no extension changes needed.

Short version: open the Copilot Chat model picker → gear icon → Manage Language Models → Add Models → Custom Endpoint (or Ollama for local). VS Code generates a chatLanguageModels.json you edit directly.

For a self-hosted OpenAI-compatible server:

[
  {
    "name": "My Local Server",
    "vendor": "customendpoint",
    "apiKey": "any-string-if-not-needed",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "your-model-id",
        "name": "My Model",
        "url": "http://localhost:11434/v1/chat/completions",
        "toolCalling": true,
        "maxInputTokens": 32768,
        "maxOutputTokens": 8192
      }
    ]
  }
]

The model lands in the chat picker next to the OpenCode ones. Tool calling, vision, thinking effort, all configurable per model in the same file. Works offline, no GitHub login, no Copilot plan.

Docs: https://code.visualstudio.com/docs/copilot/language-models#_bring-your-own-language-model-key

Closing this as already covered natively. If native BYOK doesn't fit a specific need you had in mind, drop a comment with what's missing and we can revisit.

ltmoerdani avatar Jun 30 '26 04:06 ltmoerdani