Gemini Enterprise Agent Platform (Vertex AI)
Connect your AI agents to models on Google Cloud's Gemini Enterprise Agent Platform (formerly Vertex AI), including Gemini, Claude, and self-deployed Model Garden models.
Overview
The Gemini Enterprise Agent Platform connector lets your Squid AI agents use models running in your own Google Cloud project. This is useful when your infrastructure is on GCP and you want managed model access under your own quotas and billing, or when you need models available through the platform, including self-deployed open-weight models from Model Garden.
The connector supports:
- Chat completions with three model families: first-party Gemini models, Anthropic Claude on Vertex, and self-deployed Model Garden models (such as Llama, Qwen, or Mistral) served from a Vertex AI Endpoint
- Function calling (tool use)
GCP-side prerequisites
- Enable the Vertex AI API (
aiplatform.googleapis.com) in your project. - Create a service account and download a JSON key. Two auth modes are supported:
- Service Account JSON (direct): the keyed service account calls Vertex directly and needs the Vertex AI User role (
roles/aiplatform.user) on the project. - Impersonation: the keyed service account is a low-privilege source account that impersonates a target service account holding the Vertex permissions. The source account only needs the Service Account Token Creator role on the target. This limits the blast radius if the stored key ever leaks.
- Service Account JSON (direct): the keyed service account calls Vertex directly and needs the Vertex AI User role (
- For self-deployed models, deploy the model to a Vertex AI Endpoint and note the endpoint ID (
gcloud ai endpoints list). Dedicated endpoints also need their dedicated DNS domain (dedicatedEndpointDnsfromgcloud ai endpoints describe).
Setting up the connector
- Navigate to the Squid Console and select your application.
- Click the Connectors tab.
- Click Available Connectors and find the Gemini Enterprise Agent Platform connector. Then click Add Connector.
- Provide the following details:
- Connector ID: A unique ID of your choice (e.g.,
my-vertex). This is theintegrationIdyou will reference in code. - GCP Project ID: The Google Cloud project where your Vertex AI resources live. In Impersonation mode, this is the target service account's project.
- Location: The Vertex AI location/region (e.g.,
global,us-central1,us-east5). - Auth Mode: Service Account JSON (direct) or Impersonation.
- Service Account Credentials: A Squid secret containing the service account's JSON key.
- Service Account Email: Impersonation mode only. The email of the target service account to impersonate.
- Models Configuration: A JSON array defining the models available through this connector. Each model requires the following fields:
| Field | Type | Description |
|---|---|---|
modelName | string | The model identifier (e.g., gemini-2.5-pro) |
displayName | string | A human-readable name for the model |
maxOutputTokens | number | Maximum number of tokens the model can generate in a response |
contextWindowTokens | number | Total context window size in tokens |
modelFamily | string | One of gemini, anthropic, or self_deployed |
endpointId | string | Required for self_deployed models: the Vertex AI Endpoint resource ID |
endpointDomain | string | Optional, for dedicated Model Garden endpoints: the endpoint's dedicated DNS hostname |
Example:
[
{
"modelName": "gemini-2.5-pro",
"displayName": "Gemini 2.5 Pro",
"maxOutputTokens": 65536,
"contextWindowTokens": 1048576,
"modelFamily": "gemini"
}
]
- Click Add Connector.
Using the connector
Once configured, use the connector with an AI agent by specifying the connector ID and model name:
await squid.ai().agent('my-agent').updateModel({
integrationId: 'my-vertex',
model: 'gemini-2.5-pro',
});
You can also override the model on a per-request basis:
const response = await squid
.ai()
.agent('my-agent')
.ask('Summarize our Q4 report', {
model: {
integrationId: 'my-vertex',
model: 'gemini-2.5-pro',
},
});
The configured models also appear in the model picker in the Squid Console, labeled with the connector ID.
The connector provides chat models only; it does not add embedding models. To use a custom embedding endpoint, see the OpenAI Compatible Embedding connector.