Gemini Enterprise Agent Platform(Vertex AI)
Google Cloud の Gemini Enterprise Agent Platform(旧 Vertex AI)上のモデル(Gemini、Claude、self-deployed Model Garden models を含む)に AI agents を接続します。
概要
Gemini Enterprise Agent Platform connector を使用すると、Squid AI agents は独自の Google Cloud project で実行されている models を利用できます。これは、インフラが GCP 上にあり、独自の quotas と billing の下で managed model access を使用したい場合、または Model Garden の self-deployed open-weight models を含む、この platform 経由で利用可能な models が必要な場合に便利です。
この connector は以下をサポートします。
- 3 つの model families による Chat completions: first-party Gemini models、Vertex 上の Anthropic Claude、および Vertex AI Endpoint から提供される self-deployed Model Garden models(Llama、Qwen、Mistral など)
- Function calling(tool use)
GCP 側の前提条件
- project で Vertex AI API(
aiplatform.googleapis.com)を有効にします。 - service account を作成し、JSON key をダウンロードします。2 つの auth modes がサポートされています。
- Service Account JSON (direct): key 付き service account が Vertex を直接呼び出し、project に対する Vertex AI User role(
roles/aiplatform.user)が必要です。 - Impersonation: key 付き service account は、Vertex permissions を保持する target service account を impersonate する、低権限の source account です。source account に必要なのは、target に対する Service Account Token Creator role のみです。これにより、保存された key が漏えいした場合の影響範囲を制限できます。
- Service Account JSON (direct): key 付き service account が Vertex を直接呼び出し、project に対する Vertex AI User role(
- self-deployed models の場合は、model を Vertex AI Endpoint に deploy し、endpoint ID(
gcloud ai endpoints list)を控えます。Dedicated endpoints では、専用 DNS domain(gcloud ai endpoints describeのdedicatedEndpointDns)も必要です。
connector の設定
- Squid Console に移動し、application を選択します。
- Connectors タブをクリックします。
- Available Connectors をクリックし、Gemini Enterprise Agent Platform connector を見つけます。次に Add Connector をクリックします。
- 次の詳細を入力します。
- Connector ID: 任意の一意の ID(例:
my-vertex)。これは code 内で参照するintegrationIdです。 - GCP Project ID: Vertex AI resources が存在する Google Cloud project。Impersonation mode では、これは target service account の project です。
- Location: Vertex AI location/region(例:
global、us-central1、us-east5)。 - Auth Mode: Service Account JSON (direct) または Impersonation。
- Service Account Credentials: service account の JSON key を含む Squid secret。
- Service Account Email: Impersonation mode のみ。impersonate する target service account の email。
- Models Configuration: この connector 経由で利用可能な models を定義する JSON array。各 model には次の fields が必要です。
| Field | Type | Description |
|---|---|---|
modelName | string | model identifier(例: gemini-2.5-pro) |
displayName | string | model の人間が読みやすい名前 |
maxOutputTokens | number | model が response で生成できる tokens の最大数 |
contextWindowTokens | number | tokens 単位の合計 context window size |
modelFamily | string | gemini、anthropic、または self_deployed のいずれか |
endpointId | string | self_deployed models では必須: Vertex AI Endpoint resource ID |
endpointDomain | string | 任意。dedicated Model Garden endpoints 用: endpoint の dedicated DNS hostname |
例:
[
{
"modelName": "gemini-2.5-pro",
"displayName": "Gemini 2.5 Pro",
"maxOutputTokens": 65536,
"contextWindowTokens": 1048576,
"modelFamily": "gemini"
}
]
- Add Connector をクリックします。
connector の使用
設定が完了したら、connector ID と model name を指定して、AI agent で connector を使用します。
Client code
await squid.ai().agent('my-agent').updateModel({
integrationId: 'my-vertex',
model: 'gemini-2.5-pro',
});
request ごとに model を override することもできます。
Client code
const response = await squid
.ai()
.agent('my-agent')
.ask('Summarize our Q4 report', {
model: {
integrationId: 'my-vertex',
model: 'gemini-2.5-pro',
},
});
設定された models は、connector ID のラベル付きで Squid Console の model picker にも表示されます。
注記
この connector は chat models のみを提供します。embedding models は追加しません。custom embedding endpoint を使用するには、OpenAI Compatible Embedding connector を参照してください。