Documentation
¶
Overview ¶
Package vertexai provides support for non-Gemini models hosted on Google Cloud's Vertex AI Model Garden via the OpenAI-compatible endpoint.
Vertex AI Model Garden hosts models from various publishers (Anthropic, Meta, Mistral, etc.) and exposes them through an OpenAI-compatible API. This package configures the OpenAI provider to talk to that endpoint using Google Cloud Application Default Credentials for authentication.
Usage in agent config:
models:
claude-on-vertex:
provider: google
model: claude-sonnet-4-20250514
provider_opts:
project: my-gcp-project
location: us-east5
publisher: anthropic
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsModelGardenConfig ¶
func IsModelGardenConfig(cfg *latest.ModelConfig) bool
IsModelGardenConfig returns true when the ModelConfig describes a non-Gemini model on Vertex AI (i.e. the "publisher" provider_opt is set).
func NewClient ¶
func NewClient(ctx context.Context, cfg *latest.ModelConfig, env environment.Provider, opts ...options.Opt) (*openai.Client, error)
NewClient creates an OpenAI-compatible client pointing at the Vertex AI Model Garden endpoint. It uses Google Application Default Credentials for authentication.
Types ¶
This section is empty.