-
Notifications
You must be signed in to change notification settings - Fork 2
Setup & Configuration
Configure the extension with your Google Cloud project and usage preferences.
All settings use the vertexAiChat namespace.
| Setting | Type | Default | Description |
|---|---|---|---|
vertexAiChat.projectId |
string |
"" |
Required. The GCP Project ID used for Vertex AI authentication and model discovery. Supports resource-aware scoping. |
vertexAiChat.retryMaxDurationMinutes |
integer |
30 |
Maximum retry duration for transient API failures such as 429 or 503. |
vertexAiChat.hideBillingWarning |
boolean |
false |
Hide the estimated cost warning banner in the usage dashboard. |
vertexAiChat.enableUserLabel |
boolean |
false |
Opt in to add a vscode-vertex-ai-user label to requests. Note: Only supported for Gemini and MaaS models. |
vertexAiChat.userLabelValue |
string |
"" |
Optional. Custom value for the user label. If empty, derived from active identity. |
vertexAiChat.enableProjectLabel |
boolean |
false |
Opt in to add a vscode-vertex-ai-project label to requests. Note: Only supported for Gemini and MaaS models. |
vertexAiChat.projectLabelValue |
string |
"" |
Optional. Custom value for the project label. If empty, derived from workspace name. |
The extension supports three ways to authenticate, resolved in this order:
-
Service Account Selection: A private choice made via the
Select Authentication Methodcommand. -
Environment Variable:
GOOGLE_APPLICATION_CREDENTIALSpointing to a key file. -
Application Default Credentials: Standard
gcloud authlogin.
See Quick Start and Service Account Authentication for more.
To keep billing tied to a specific project for a repository, use .vscode/settings.json:
{
"vertexAiChat.projectId": "my-gcp-project-id"
}- Workspace settings are useful when you switch between multiple projects or clients.
- Global settings are fine for a single development environment.
Most settings are resource-aware, meaning you can override them at the Workspace Folder level in multi-root workspaces. This is particularly useful for vertexAiChat.projectId and cost attribution labels.
The extension automatically re-runs model discovery when vertexAiChat.projectId changes.
If you previously used the older vertexAnthropic configuration namespace, the extension automatically migrates
vertexAnthropic.projectId and vertexAnthropic.hideBillingWarning into vertexAiChat.
vertexAiChat.retryMaxDurationMinutes controls how long the extension will retry transient API failures
before failing the request. This helps reduce interruptions from temporary rate limits or service unavailability.
- Set
vertexAiChat.projectIdin the workspace when working across multiple Google Cloud projects. - Keep
enableUserLabelandenableProjectLabeloff unless your organization wants cost attribution labels. - Use
hideBillingWarning=trueonly after you understand that the dashboard uses estimated costs, not invoice totals.