Vertex Anthropic Provider for VS CodeA VS Code extension that registers Anthropic Claude models (via Google Cloud Vertex AI) as native language model chat providers. Once installed, the models appear alongside other models in the VS Code Copilot Chat view — no separate UI, no extra windows. The extension automatically discovers which Claude models are available in your project and picks the best region, so there’s nothing to configure beyond your GCP Project ID. How It WorksThe extension implements the
InstallationFrom
|
| Setting | Type | Default | Description |
|---|---|---|---|
vertexAnthropic.projectId |
string |
"" |
Your GCP Project ID (required) |
vertexAnthropic.modelCatalogUrl |
string |
(GitHub raw) | URL to a remote models.json catalog. Set to empty to use only the bundled catalog. |
Example:
// settings.json
{
"vertexAnthropic.projectId": "my-gcp-project-123"
}
The region is auto-detected — no configuration needed.
⚠️ The extension will show a warning on activation if
projectIdis not set.
Usage
- Open the Chat view in VS Code (Copilot icon in the sidebar, or
Ctrl+Shift+I). - Click the model picker — all discovered Vertex Claude models will be listed (e.g. "Vertex Claude Opus 4.6", "Vertex Claude Sonnet 4.6").
- Type a message and send — responses stream in real time from Vertex AI.
- Paste images directly into the chat for vision analysis.
The models support tool calling, so they work with VS Code’s built-in agent tools and any extensions that provide tool definitions.
Commands
- Vertex Anthropic: Refresh Models (
Ctrl+Shift+P) — re-runs model discovery.
Status Bar & Dashboard
- An interactive Cost Tracker exists in native VS Code Status bar updating on the fly when tokens resolve.
- Click the Status Bar or Run
Vertex Anthropic: Show Usage Dashboardto open the local Cost Tracking Webview filtering all Usage & Payload metrics.
Diagnostics
Open the Output panel and select Vertex Anthropic to see detailed logs: catalog loading, region probing, message mapping, token usage, and stream lifecycle.
Candidate Models
The extension discovers models from a JSON catalog. The default bundled catalog includes:
| Model ID | Display Name | Max Input | Max Output | Vision | Tools |
|---|---|---|---|---|---|
claude-opus-4-6 |
Claude Opus 4.6 | 1M | 128K | ✅ | ✅ |
claude-sonnet-4-6 |
Claude Sonnet 4.6 | 1M | 128K | ✅ | ✅ |
claude-haiku-4-5 |
Claude Haiku 4.5 | 200K | 64K | ✅ | ✅ |
Only models that respond to a ping in your project are registered. Update the list by pointing vertexAnthropic.modelCatalogUrl to your own models.json.
Development
npm run watch # compile TypeScript in watch mode
npm run lint # run ESLint
npm run test # run tests
Press F5 to launch the Extension Development Host. Use Ctrl+R inside the host window to reload after code changes.
License
See the LICENSE file for details.