Static Optional ReadonlySupportsWhether this driver subclass supports dynamic, multi-tool sets projected into the realtime session (e.g. direct action invocation on realtime co-agents).
Static capability descriptor read before a session instance exists.
Default: absent / false. Subclasses that support dynamic toolsets declare public static readonly SupportsDynamicToolSet = true;.
ProtectedapiOnly sub-classes can access the API key
The voices Gemini Live can speak with — used to populate the voice picker. Includes all 30 built-in Gemini voices supported in prebuiltVoiceConfig.
Gemini Live supports the client-direct topology: the server mints a short-lived ephemeral
auth token (v1alpha auth_tokens API) that the browser uses to open its OWN Live
websocket, while the server keeps prompt/tool authority by LOCKING the connect config into
the token via liveConnectConstraints.
Whether this driver's sessions carry a video track in addition to audio — i.e. the model accepts video input (it can "see" the user's camera) and/or emits video output (a talking-head avatar / generated video), in sync with audio.
Defaults to false (audio-only — today's realtime models). Video-capable drivers (a native
multimodal realtime model, or an avatar provider) override this to true. The session's media
plane is media-tagged (IRealtimeSession.SendInput takes a RealtimeMediaKind;
IRealtimeSession.OnVideoOutput delivers video-out), so a video session reuses the entire
realtime contract — only the media frames gain a video kind. Resolution prefers a video-capable
model when an agent requests video, and degrades to audio-only otherwise.
true if sessions can carry video; false (audio-only) otherwise.
ProtectedconnectCreation seam for the underlying Gemini Live session.
Production code routes through ai.live.connect; unit tests override this method to inject a
fake GeminiLiveSession. Kept as a thin, single-responsibility method so the network
boundary is the only thing tests need to replace.
Resolved model, connect config, and the server-message callback.
A promise resolving to the live session handle.
Mints an ephemeral, server-scoped Live credential for a client-direct session.
The connect config is built EXACTLY as StartSession builds it (same
buildConnectConfig: audio modality, input+output transcription, system instruction,
mapped tools) and is locked into the token via liveConnectConstraints +
lockAdditionalFields: [] — so the API ignores any attempt by the browser to change the
locked fields. The same config is ALSO carried in SessionConfig (as { model, config })
because the SDK still expects the client to pass a model/config at live.connect time; the
token-side lock is what makes the server's prompt and tool set authoritative.
Expiry: the browser must open its session within GEMINI_CLIENT_TOKEN_NEW_SESSION_WINDOW_MS; the token (and thus the session's ability to send messages) dies at GEMINI_CLIENT_TOKEN_EXPIRY_MS.
Session configuration (model, system prompt, tools, config bag).
The minted ClientRealtimeSessionConfig the browser authenticates + applies.
OptionalExchangeOptional WebRTC SDP exchange seam for drivers that support server-brokered WebRTC topologies.
The local SDP offer generated by the browser.
Optional_sessionConfig: Record<string, unknown>The session configuration to initialize the session with.
The answer SDP, provider session ID, and any prebill accounting.
ProtectedmintMint seam for the ephemeral auth token. Production routes through the SDK's
authTokens.create on a v1alpha client (ephemeral tokens are v1alpha-only); unit tests
override this to return a fake token with no network.
The auth-token create parameters (expiry, uses, live-connect constraints).
The created AuthToken (its name is the credential the browser presents).
Opens a Gemini Live session and returns the Core session handle that translates between the provider's frames and the MemberJunction realtime contract.
StaticBuildProjects the full connect config down to the fields Gemini's ephemeral-token API accepts
as liveConnectConstraints.config. The token mint converts the provided keys into a
field mask over BidiGenerateContentSetup, and only generation-level fields are valid
there — systemInstruction, tools, and the transcription configs are NOT, and their
presence 400s the entire mint. Only defined fields are copied (an absent key must stay
absent so it doesn't enter the mask).
StaticMapMaps Core RealtimeToolDefinitions up to Gemini FunctionDeclarations.
The Core ParametersSchema is a JSON-schema object, so it rides in parametersJsonSchema
(the SDK's JSON-schema slot) rather than the OpenAPI-style parameters slot.
Real-time, full-duplex driver for Google's Gemini Live API, implementing the Core BaseRealtimeModel primitive.
The driver opens a bidirectional Gemini Live session, streams client audio in, and translates the provider's LiveServerMessage frames into the modality-agnostic Core events (RealtimeTranscript, RealtimeToolCall, RealtimeUsage, output media, and interruption). It registers via the MemberJunction class factory as
GeminiRealtimeand is resolved forMJ: AI ModelstypedRealtime.Testability: the live-session creation is isolated behind the overridable connectLiveSession seam, so unit tests inject a fake GeminiLiveSession and exercise the full message→event translation with no network.