Skip to content

[Feature]: Add Vertex AI Anthropic provider (Claude on GCP) #6937

@markbooch

Description

@markbooch

Summary

Add native support for Claude models on Google Vertex AI, enabling enterprise users to use Claude via their existing GCP infrastructure with Application Default Credentials (ADC) authentication.

Problem

Enterprise users need Claude via Vertex AI for:

  • Compliance/data residency - Data stays within GCP
  • Cost optimization - Use existing GCP credits directly
  • IAM integration - Use existing GCP service accounts, no API key management
  • Billing consolidation - Single GCP invoice

Currently, there's no native way to use Claude via Vertex AI in OpenClaw.

Who this helps

  • Enterprise GCP customers with existing Vertex AI access
  • Teams with GCP credits who want to use them directly
  • Organizations requiring data residency (EU/APAC GCP regions)
  • DevOps teams preferring gcloud ADC over API key rotation

Proposed solution

New provider: vertex-anthropic

Config example:

agents:
  defaults:
    model:
      primary: vertex-anthropic/claude-opus-4-5@20251101

Environment setup:

gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT=my-project
export GOOGLE_CLOUD_LOCATION=us-east5  # or europe-west1, etc.

Implementation approach:

  1. Use @anthropic-ai/sdk with Vertex AI transport (similar to direct Anthropic provider)
  2. Auth via gcloud ADC (google-auth-library)
  3. Model catalog matching Vertex AI Model Garden availability
  4. Full feature parity: streaming, tools, vision, extended thinking

Technical notes

  • Vertex AI Claude uses same API format as direct Anthropic (just different auth/endpoint)
  • @anthropic-ai/sdk has built-in Vertex support via AnthropicVertex class
  • Existing google-vertex provider handles Gemini; this would be a parallel provider for Claude

Future extensibility

This implementation lays groundwork for broader Vertex AI Model Garden support, similar to AWS Bedrock's multi-provider approach:

  • Current: Claude (Anthropic) on Vertex AI
  • Future potential: Llama, Mistral, and other Model Garden models as they become available

The provider architecture can be designed to easily extend to additional Model Garden offerings, providing a unified GCP-native experience for multiple model families.

Prior work

The PR implementation is ready and tested on live GCP. Happy to resubmit after discussion.

Willingness to contribute

✅ Ready to submit PR with:

  • Full implementation
  • Unit tests
  • Documentation
  • Tested on live GCP Vertex AI

Would appreciate maintainer input on:

  1. Preferred provider naming (vertex-anthropic vs google-vertex-claude)
  2. Any concerns with the ADC auth approach
  3. Whether to post in #pr-thunderdome-dangerzone on Discord

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions