Skip to main content
Access leading AI models like Gemini and Claude 4.5 Sonnet through Google Cloud’s Vertex AI platform. Website: https://cloud.google.com/vertex-ai

Prerequisites

  • GCP account with billing enabled
  • GCP project created
  • IAM permissions configured

Setup Steps

1. Prepare GCP Environment

  1. Sign in: Google Cloud Console
  2. Create/select project: Use existing or create new project
  3. Set up IAM:
    • Grant Vertex AI User role (roles/aiplatform.user)
    • For service accounts, add Vertex AI Service Agent role (roles/aiplatform.serviceAgent)

2. Choose Region and Enable Models

  1. Select region: Choose region for latency/compliance needs (e.g., us-east5, us-central1, europe-west1)
    • Use global endpoint for higher availability (Gemini only)
  2. Enable models: Go to Vertex AI → Model Garden and enable desired models (e.g., Claude 4.5 Sonnet v2)

3. Configure CodinIT

  1. Install CodinIT extension in VS Code
  2. Click settings icon (⚙️)
  3. Select GCP Vertex AI as API Provider
  4. Enter your Google Cloud Project ID
  5. Select your Region
  6. Choose your Model (e.g., Claude 4.5 Sonnet v2)
  7. Save and test

4. Authentication

Option A: User Credentials
gcloud init
gcloud auth application-default login
Restart VS Code after authentication. Option B: Service Account
  1. Create service account in GCP Console
  2. Assign Vertex AI User and Service Agent roles
  3. Generate JSON key
  4. Set environment variable:
    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
    
  5. Launch VS Code from terminal with this variable set

Supported Regions

  • us-east5 (Columbus, Ohio)
  • us-central1 (Iowa)
  • europe-west1 (Belgium)
  • europe-west4 (Netherlands)
  • asia-southeast1 (Singapore)
  • global (Global - Gemini only)

Notes

  • Cross-region inference: Check “Cross Region Inference” for models requiring inference profiles
  • First-time use: Some models (e.g., Anthropic) require submitting use case form via Console
  • Permissions: Minimal required: bedrock:InvokeModel, bedrock:InvokeModelWithResponseStream
  • Monitoring: Use CloudWatch and CloudTrail for logging and monitoring
  • Security: Follow GCP IAM Best Practices

Resources