Skip to content

Google Vertex AI

provider: 'vertex'

Vertex AI serves Gemini, Claude, and Grok models behind a single GCP project. Authentication uses Application Default Credentials (ADC).

Authentication

Local development:

bash
gcloud auth application-default login

CI / service account:

bash
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json

Required configuration

ts
{
  provider: 'vertex',
  model: 'gemini-3-5-flash',
  extra: {
    project: 'my-gcp-project',   // GCP project ID
    location: 'us-central1',     // Vertex AI region
  },
}

Both extra.project and extra.location are required. The model will throw at startup if either is missing.

FieldDescription
extra.projectYour GCP project ID (e.g. my-project-123)
extra.locationThe Vertex AI region (e.g. us-central1)

Available regions

Common choices: us-central1, us-east4, europe-west1. Refer to the Vertex AI locations documentation for the full list and model availability per region.

Models

Modelmodel
Gemini 3.5 Flashgemini-3-5-flash
Gemini 3.1 Pro Previewgemini-3-1-pro-preview
Claude Sonnet 4.6claude-sonnet-4-6
Claude Opus 4.8claude-opus-4-8
Claude Haiku 4.5claude-haiku-4-5
Grok 4.3grok-4-3

Claude models on Vertex are served through the AnthropicVertex backend; Gemini through the Google GenAI Vertex backend; Grok through Vertex's OpenAI-compatible endpoint. All three only need extra.project and extra.location.