Documentation
¶
Overview ¶
Package vertex provides an Anthropic client for Claude models hosted on Google Cloud's Vertex AI. It lives in its own package so that importing the core anthropic provider does not pull the Google Cloud auth stack (cloud.google.com/go/auth, google.golang.org/api, grpc, ...).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(ctx context.Context, cfg *latest.ModelConfig, env environment.Provider, project, location string, opts ...options.Opt) (*anthropic.Client, error)
NewClient creates a new Anthropic client that talks to Claude models hosted on Google Cloud's Vertex AI via the Anthropic-native endpoints (`:rawPredict` and `:streamRawPredict`), authenticated with Google Application Default Credentials.
This is required because Anthropic models on Vertex AI do not support the OpenAI-compatible `/chat/completions` endpoint and fail with `FAILED_PRECONDITION: The deployed model does not support ChatCompletions.`
Types ¶
This section is empty.