V

Vertex AI Provider Settings

Configure Claude Code to route requests through Google Cloud Vertex AI. Run Claude models within your Google Cloud environment for enterprise compliance, data residency requirements, and consolidated billing through your GCP account.

SettingCommunityinfrastructurev1.0.0MIT
0 views0 copies

Provider Configuration

Set these environment variables before launching Claude Code:

# Required: Vertex AI provider settings export CLAUDE_CODE_USE_VERTEX=1 export CLOUD_ML_REGION=us-east5 export ANTHROPIC_VERTEX_PROJECT_ID=your-gcp-project-id

Settings File

Optionally configure model preferences in .claude/settings.json:

{ "env": { "CLAUDE_CODE_USE_VERTEX": "1", "CLOUD_ML_REGION": "us-east5", "ANTHROPIC_VERTEX_PROJECT_ID": "your-gcp-project-id" }, "preferences": { "model": "claude-sonnet-4-20250514" } }

Available Regions

RegionLocation
us-east5Columbus, Ohio
us-central1Iowa
europe-west1Belgium
europe-west4Netherlands
asia-southeast1Singapore

Prerequisites

  1. GCP Project with Vertex AI API enabled
  2. Authentication: Run gcloud auth application-default login
  3. IAM Role: Vertex AI User role on the project
  4. Model Access: Request access to Claude models in Vertex AI Model Garden

Troubleshooting

IssueSolution
Permission deniedCheck IAM role: gcloud projects get-iam-policy $PROJECT_ID
Model not foundVerify model access in Vertex AI Model Garden
Region not availableTry us-east5 (primary region for Claude)
Auth failedRe-run gcloud auth application-default login

Cost Management

  • Vertex AI pricing is per-token, billed to your GCP project
  • Set budget alerts in GCP Console > Billing > Budgets
  • Use claude-haiku-4-20250514 for cost-sensitive tasks
  • Monitor usage in Vertex AI > Model Monitoring
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates