Overview
The Vertex AI Anthropic provider connects core-ai to Claude models hosted on Google Vertex AI through the official@anthropic-ai/vertex-sdk client. It shares its request, streaming, tool-calling, structured-output, and reasoning behavior with @core-ai/anthropic — everything documented on the Anthropic Provider page applies equally here.
Installation
createAnthropicVertex()
Create a Vertex AI Anthropic provider instance.Options
Your Google Cloud project id. Required unless
client is provided.The Vertex AI region hosting the Claude model, for example
europe-west1 or
eu. Required unless client is provided. A provider instance targets a
single region — create separate providers if you need models hosted in
different regions.A parsed Google service account JSON key. When omitted, the provider falls
back to Application Default Credentials
(ADC).
Provide your own configured client (for example a custom
AnthropicVertex
instance).Default maximum tokens for completions. Can be overridden per request.
Returns
AnthropicVertexProvider with method chatModel().
Authentication
By default, the provider uses Application Default Credentials:credentials:
Model IDs and regions
Pass the Vertex model id (as listed in the Vertex AI Model Garden) tochatModel(). Model availability and naming vary by region — some Claude models are published to Vertex AI’s eu multi-region while others are published to region-specific endpoints such as europe-west1. Since a provider instance targets a single region, create separate providers for models hosted in different regions:
Pass the unversioned Vertex model id (e.g.
claude-sonnet-4-6) rather than
a version-pinned id (e.g. claude-sonnet-4-6@20250929). Reasoning- effort
and sampling-restriction capability detection
(getAnthropicModelCapabilities and friends in @core-ai/anthropic) only
recognizes the unversioned form today, so a version-pinned id silently falls
back to standard capabilities instead of the model’s actual ones.Capabilities
| Feature | Support |
|---|---|
| Chat Completion | Yes |
| Streaming | Yes |
| Function Calling | Yes |
| Vision | Yes |
| Reasoning | Yes |
| Prompt Caching | Yes |
| Embeddings | No |
| Image Generation | No |
getAnthropicModelCapabilities(modelId) are available from @core-ai/anthropic and apply to Vertex-hosted Claude models.
Examples
Basic chat
Streaming
Provider-specific options and reasoning
Provider options are namespaced underanthropic in providerOptions, matching @core-ai/anthropic:
Error handling
Errors are attributed to provider id
anthropic-vertex, distinguishing them
from direct @core-ai/anthropic errors (anthropic).Related
Anthropic Provider
Claude models via the direct Anthropic API
Google GenAI Provider
Gemini models with multimodal support
Chat Completion Guide
Learn how to use chat completion