Skip to content

Vertex AI

Vertex AI uses Google Application Default Credentials (ADC). The runner points GOOGLE_APPLICATION_CREDENTIALS at the mounted service-account key file.

apiVersion: v1
kind: Secret
metadata:
name: vertex-credentials
type: Opaque
data:
# key name MUST be GOOGLE_APPLICATION_CREDENTIALS; value is a
# base64-encoded JSON service account key.
GOOGLE_APPLICATION_CREDENTIALS: <base64>
---
apiVersion: genkit.dev/v1alpha1
kind: PluginConfig
metadata:
name: vertexai
spec:
type: vertexai
region: us-central1
credentialsRef:
name: vertex-credentials
extraConfig:
projectId: my-gcp-project
# location takes precedence over the top-level region field
# location: us-central1
---
apiVersion: genkit.dev/v1alpha1
kind: Model
metadata:
name: gemini-2-pro
spec:
provider: vertexai
model: gemini-2.0-pro
pluginConfigRef:
name: vertexai
Default keyNotes
GOOGLE_APPLICATION_CREDENTIALSPath to the SA key; the runner sets the env var for the SDK
FieldTypeDescription
projectIdstringGCP project ID
locationstringGCP region; overrides top-level region