Files
coder/docs/ai-coder/ai-gateway/clients/vscode.md
T
Susana Ferreira a1921b6bc0 docs: update AI Gateway URLs from /aibridge to /ai-gateway (#26664)
## Description

Updates documentation to use the new `/api/v2/ai-gateway/` URLs and
`/ai-gateway/` UI paths, following the backend rename in #26475 and
frontend route rename in #26569.

## Changes

- Update URL references across documentation files from
`/api/v2/aibridge/` to `/api/v2/ai-gateway/`
- Update UI path reference from `/aibridge/sessions` to
`/ai-gateway/sessions`
- Update route path references in client setup guides
- Covers client setup guides, authentication, monitoring, proxy setup,
and provider configuration

Addresses
https://github.com/coder/coder/pull/26475#issuecomment-4768351217

Refs https://linear.app/codercom/issue/AIGOV-226

> Generated with the assistance of Coder Agents (@ssncferreira)
2026-06-25 19:02:39 +01:00

2.7 KiB

Note

AI Gateway requires the AI Governance Add-On. As of Coder v2.32, deployments without the add-on will not be able to access AI Gateway.

VS Code's native chat can be configured to use AI Gateway via the Custom Endpoint language model provider (VS Code 1.122+, Stable). GitHub sign-in is not required, so this works in air-gapped or restricted environments.

Setup

Requires VS Code 1.122+ and the GitHub Copilot Chat extension.

For each provider below, the setup steps are:

  1. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P on Mac) and run Chat: Manage Language Models.
  2. Select Add → Custom Endpoint.
  3. Enter a group name, display name, your Coder API token as the API key, and the API type shown below.
  4. To add or edit models, select the gear icon next to the provider in the Language Models view to open chatLanguageModels.json.

Important

Enter your API token through the UI. VS Code stores it securely and inserts a reference like ${input:chat.lm.secret.XXXXX} into the JSON. Do not paste your token directly into the JSON file.

Replace coder.example.com with your Coder deployment URL. Model IDs must match what is configured in your AI Gateway.

OpenAI-compatible models

Set API type to responses.

{
    "name": "Coder (OpenAI)",
    "vendor": "customendpoint",
    "apiKey": "${input:chat.lm.secret.XXXXX}",
    "apiType": "responses",
    "models": [
        {
            "id": "gpt-5.5",
            "name": "GPT 5.5",
            "url": "https://coder.example.com/api/v2/ai-gateway/openai",
            "toolCalling": true,
            "vision": true,
            "thinking": true,
            "streaming": true,
            "maxInputTokens": 272000,
            "maxOutputTokens": 128000
        }
    ]
}

Anthropic models

Set API type to messages.

{
    "name": "Coder (Anthropic)",
    "vendor": "customendpoint",
    "apiKey": "${input:chat.lm.secret.XXXXX}",
    "apiType": "messages",
    "models": [
        {
            "id": "claude-sonnet-4.6",
            "name": "Claude Sonnet 4.6",
            "url": "https://coder.example.com/api/v2/ai-gateway/anthropic",
            "toolCalling": true,
            "vision": true,
            "thinking": true,
            "streaming": true,
            "maxInputTokens": 1000000,
            "maxOutputTokens": 64000
        }
    ]
}

References: VS Code - Bring your own language model