Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Custom Endpoint Agent Host BridgeNew to Visual Studio Code? Get it now.
Custom Endpoint Agent Host Bridge

Custom Endpoint Agent Host Bridge

maxerbox

|
4 installs
| (0) | Free
Registers custom endpoint BYOK models for the VS Code Agent Host (Copilot CLI) picker
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Custom Endpoint Agent Host Bridge

A minimal VS Code extension that registers your self-hosted / custom-endpoint BYOK models for the Agent Host (Copilot CLI) model picker.

Why This Exists

VS Code's chatLanguageModels.json does not support the targetChatSessionType field — it only works through the vscode.lm.registerLanguageModelChatProvider() API at runtime. This extension does exactly that: registers your custom endpoint models with targetChatSessionType: "copilotcli" so they appear in the Agent Host picker.

Setup

1. Install dependencies and compile

cd c:\Users\SSI63\Documents\custom-endpoint-agent-host
npm install
npm run compile

2. Install the extension locally

Press F5 in VS Code to launch an Extension Development Host, or package and install:

npx vsce package
code --install-extension custom-endpoint-agent-host-0.0.1.vsix

3. Configure your models

Add to your VS Code settings.json:

"customEndpointAgentHost.models": [
  {
    "id": "glm-5.2-fp8",
    "name": "glm-5.2-fp8",
    "url": "http://px106.prod.exalead.com:8000/v1",
    "apiKey": "your-api-key",
    "maxInputTokens": 200000,
    "maxOutputTokens": 59968,
    "toolCalling": true,
    "vision": false
  },
  {
    "id": "moonshotai/Kimi-K2.7-Code",
    "name": "moonshotai/Kimi-K2.7-Code",
    "url": "http://px105.prod.exalead.com:8000/v1",
    "apiKey": "your-api-key",
    "maxInputTokens": 200000,
    "maxOutputTokens": 62144,
    "toolCalling": true,
    "vision": false
  }
]

4. Use it

  1. Ensure "chat.agentHost.enabled": true in your settings.
  2. Open the Agent Host picker (select Agent Host - Copilot).
  3. Your models will appear in the model list.

How It Works

chatLanguageModels.json  →  regular Chat view (no targetChatSessionType)
         ↓
This extension           →  Agent Host picker (targetChatSessionType: "copilotcli")

The extension calls vscode.lm.registerLanguageModelChatProvider() with vendor "custom-ah" and tags each model with targetChatSessionType: "copilotcli". VS Code's filterModelsForSession() then routes these models to the Agent Host session picker.

Limitations

  • Only supports OpenAI-compatible /v1/chat/completions streaming endpoints
  • No vision/image input support yet (text-only)
  • Token counting is a rough estimate (~4 chars/token)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft