Gemini Live on Vertex AI
Real-time speech-to-speech with GeminiLiveVertexLLMService, the Gemini Live API through Vertex AI with service account or ADC authentication.
Overview
GeminiLiveVertexLLMService runs Gemini Live through Vertex AI. It extends
GeminiLiveLLMService, so audio, transcripts, VAD, tools,
thinking and compression work the same way. Authentication, the endpoint and a few features
differ.
GeminiLiveVertexLLMService: Gemini Live on Vertex AI, with a Google Cloud project, a region and service account credentials or Application Default Credentials (ADC).
Upstream page
Pipecat's documentation for the same service.
Source
packages/google/src/gemini_live/vertex/llm.ts.
Vertex AI Live API docs
The Live API on Vertex AI.
Installation
bun add @pipedog/googleimport { GeminiLiveVertexLLMService } from "@pipedog/google/gemini_live/vertex/llm";Prerequisites
- A Google Cloud project with the Vertex AI API enabled.
- A service account with access to Vertex AI, as a key file or a JSON string, or ADC
(
gcloud auth application-default login, or the attached service account on GCP). - The examples read
GOOGLE_CLOUD_PROJECT_ID,GOOGLE_CLOUD_LOCATION, andGOOGLE_APPLICATION_CREDENTIALS(a key file path) orGOOGLE_CREDENTIALS_JSON(the key itself).
GeminiLiveVertexLLMService
Configuration
Prop
Type
Settings
GeminiLiveVertexLLMService.Settings has the same fields as
GeminiLiveLLMService.Settings, with the same
defaults except model, which is "google/gemini-3.8-live" (Vertex AI model identifiers carry
the google/ publisher prefix).
Usage
import { GeminiLiveVertexLLMService } from "@pipedog/google/gemini_live/vertex/llm";
const llm = new GeminiLiveVertexLLMService({
credentialsPath: process.env.GOOGLE_APPLICATION_CREDENTIALS ?? "",
projectId: process.env.GOOGLE_CLOUD_PROJECT_ID ?? "",
location: process.env.GOOGLE_CLOUD_LOCATION ?? "us-east4",
systemInstruction: "You are a friendly voice assistant.",
settings: new GeminiLiveVertexLLMService.Settings({
model: "google/gemini-3.8-live",
voice: "Charon",
}),
});With the service account key as a JSON string:
// A service account key as a JSON string. Leave out both credentials options
// to use Application Default Credentials.
const fromJson = new GeminiLiveVertexLLMService({
credentials: process.env.GOOGLE_CREDENTIALS_JSON ?? "",
projectId: process.env.GOOGLE_CLOUD_PROJECT_ID ?? "",
location: "us-east4",
});Authentication
The service picks credentials in this order:
credentials: a service account key as a JSON string. It is parsed in the constructor.credentialsPath: the path to a key file, read by the client.- Neither: Application Default Credentials.
All three go to @google/genai as googleAuthOptions with the cloud-platform scope, and
google-auth-library inside the SDK loads the key file, finds ADC and refreshes the access token
as it expires.
Upstream loads the credentials and refreshes a token in the constructor, so missing ADC fails there with "No valid credentials provided.". Here those steps are asynchronous and happen on first connect, so missing credentials surface as a connection error.
Methods
setAudioInputPaused(), setVideoInputPaused(), setModelModalities() and setLanguage()
work as on Gemini Live.
Notes
- Passing
apiKeythrows: Vertex AI takescredentials,credentialsPathor ADC. projectIdandlocation(a region such as"us-east4") are required.- The Gemini File API isn't available:
fileApithrowsNotImplementedError. Use Google Cloud Storage for files. - Vertex's Live endpoint doesn't support
NON_BLOCKINGtool calls. Functions registered withcancelOnInterruption: falserun synchronously (the conversation pauses while they run), and the first time one is used the service logs an error and pushes an error frame. historyConfigis not sent on Vertex AI.
Runtime notes
| Runtime | Works | What it needs |
|---|---|---|
| Bun | ✅ yes | Nothing. |
| Node.js | ✅ yes | Nothing. |
| Deno | ✅ yes | Nothing. |
| Cloudflare Workers | ✅ yes | Nothing. |
Generated from pipecat.runtimes and pipecat.compat in packages/google/package.json: ✅ means the compat smoke test passes on that runtime.
Authentication goes through google-auth-library, which only the Node build of @google/genai
supports. This service runs on Bun, Node and Deno, not on Cloudflare Workers. On Workers, use
GeminiLiveLLMService with a Gemini API key.
The deprecated upstream model, voiceId and params constructor options are not ported;
use settings.
pipedog is an unofficial community TypeScript port of Pipecat. It is not affiliated with or endorsed by Daily or the Pipecat project.
Portions adapted from the Pipecat documentation, Copyright (c) 2024–2025 Daily, BSD-2-Clause (see apps/docs/LICENSE-pipecat-docs).