Help us shape the future of Go! Take the 2026 Go Developer Survey

vertexai

package
v1.49.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL