docs(docs/ai-coder/ai-gateway/clients): update VS Code to reflect 1.122 Custom Endpoint support (#26126)

Updates the VS Code AI Gateway client docs to reflect the Custom
Endpoint provider introduced in VS Code 1.121 (Insiders) and promoted to
Stable in 1.122.

## Changes

**`docs/ai-coder/ai-gateway/clients/vscode.md`**
- Replace the deprecated `customoai` vendor with `customendpoint`
- Add the required `apiType` field (`responses` for OpenAI, `messages`
for Anthropic)
- Add Anthropic provider setup (Messages API type, base URL
`…/aibridge/anthropic`)
- Note GitHub sign-in is no longer required — works in
air-gapped/restricted environments
- Add limitation callout: inline suggestions and NES still require
GitHub Copilot
- Reflect the UI-first API key entry flow (VS Code stores the token
securely; do not paste into JSON directly)
- Drop the Centralized/BYOK split — VS Code has no template injection
path, so both scenarios follow the same user-driven UI flow

**`docs/ai-coder/ai-gateway/clients/index.md`**
- VS Code compatibility row: Anthropic `❌ → ✅`
- Updated Notes column

<details>
<summary>Research notes</summary>

- VS Code 1.121 shipped the Custom Endpoint provider (Insiders),
replacing the legacy OpenAI Compatible (`customoai`) provider which is
now deprecated.
- VS Code 1.122 promoted Custom Endpoint to Stable and removed the
GitHub sign-in requirement for BYOK.
- Anthropic support confirmed working: `apiType: "messages"` + base URL
`…/api/v2/aibridge/anthropic` (Coder's gateway accepts the Coder session
token as `x-api-key`).
- OpenAI uses `apiType: "responses"` + base URL
`…/api/v2/aibridge/openai`.
- API keys must be entered via the Manage Language Models UI — VS Code
stores them securely and references them as
`${input:chat.lm.secret.XXXXX}` in the JSON.
</details>

> This PR was drafted by Coder Agents on behalf of @matifali.
This commit is contained in:
Atif Ali
2026-06-08 07:35:20 +00:00
committed by GitHub
parent 47a8c9572f
commit 2211f9ce4b
2 changed files with 61 additions and 44 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ The table below shows tested AI clients and their compatibility with AI Gateway.
| [Factory](./factory.md) | ✅ | ✅ | ✅ | |
| [Cline](./cline.md) | ✅ | ✅ | ✅ | |
| [Kilo Code](./kilo-code.md) | ✅ | ✅ | ❌ | |
| [VS Code](./vscode.md) | ✅ | ❌ | ❌ | Only supports Custom Base URL for OpenAI. |
| [VS Code](./vscode.md) | ✅ | ✅ | ❌ | VS Code 1.122+ via Custom Endpoint provider. GitHub sign-in not required. Inline suggestions still require GitHub Copilot. |
| [JetBrains IDEs](./jetbrains.md) | ✅ | ❌ | ❌ | Works in Chat mode via [third-party model configuration](https://www.jetbrains.com/help/ai-assistant/use-custom-models.html#provide-your-own-api-key). |
| [Zed](./zed.md) | ✅ | ✅ | ❌ | |
| [GitHub Copilot](./copilot.md) | ⚙️ | - | - | Requires [AI Gateway Proxy](../ai-gateway-proxy/index.md). Uses per-user GitHub tokens. |
+60 -43
View File
@@ -1,60 +1,77 @@
# VS Code
> [!NOTE]
> AI Gateway requires the [AI Governance Add-On](../../ai-governance.md).
> 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 with the GitHub Copilot Chat extension's custom language model support.
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.
## Centralized API Key
## Setup
Requires VS Code 1.122+ and the [GitHub Copilot Chat extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat).
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**.
1. Select **Add** → **Custom Endpoint**.
1. Enter a **group name**, **display name**, your **[Coder API token](../../../admin/users/sessions-tokens.md#generate-a-long-lived-api-token-on-behalf-of-yourself)** as the API key, and the **API type** shown below.
1. To add or edit models, select the gear icon next to the provider in the Language Models view to open `chatLanguageModels.json`.
> [!IMPORTANT]
> You need the **Pre-release** version of the [GitHub Copilot Chat extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat) and [VS Code Insiders](https://code.visualstudio.com/insiders/).
> 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.
1. Open command palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and search for _Chat: Open Language Models (JSON)_.
1. Paste the following JSON configuration, replacing `<your-coder-api-token>` with your **[Coder API token](../../../admin/users/sessions-tokens.md#generate-a-long-lived-api-token-on-behalf-of-yourself)**:
_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`.
```json
[
{
"name": "Coder",
"vendor": "customoai",
"apiKey": "<your-coder-api-token>",
"models": [
{
"name": "GPT 5.2",
"url": "https://coder.example.com/api/v2/aibridge/openai/v1/chat/completions",
"toolCalling": true,
"vision": true,
"thinking": true,
"maxInputTokens": 272000,
"maxOutputTokens": 128000,
"id": "gpt-5.2"
},
{
"name": "GPT 5.2 Codex",
"url": "https://coder.example.com/api/v2/aibridge/openai/v1/responses",
"toolCalling": true,
"vision": true,
"thinking": true,
"maxInputTokens": 272000,
"maxOutputTokens": 128000,
"id": "gpt-5.2-codex"
}
]
}
]
{
"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/aibridge/openai",
"toolCalling": true,
"vision": true,
"thinking": true,
"streaming": true,
"maxInputTokens": 272000,
"maxOutputTokens": 128000
}
]
}
```
_Replace `coder.example.com` with your Coder deployment URL._
### Anthropic models
> [!NOTE]
> The setting names may change as the feature moves from pre-release to stable. Refer to the official documentation for the latest setting keys.
Set **API type** to `messages`.
## BYOK (Personal API Key)
```json
{
"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/aibridge/anthropic",
"toolCalling": true,
"vision": true,
"thinking": true,
"streaming": true,
"maxInputTokens": 1000000,
"maxOutputTokens": 64000
}
]
}
```
> [!NOTE]
> At the time of writing, GitHub Copilot Chat does not support sending custom headers, so BYOK mode is not available.
**References:** [GitHub Copilot - Bring your own language model](https://code.visualstudio.com/docs/copilot/customization/language-models#_add-an-openaicompatible-model)
**References:** [VS Code - Bring your own language model](https://code.visualstudio.com/docs/copilot/customization/language-models)