ProtectedapiOnly sub-classes can access the API key
The provider-native voice ids this model can speak with (e.g. OpenAI alloy/echo/shimmer). The
model/driver is the authoritative owner of "what voices do I support", so each driver declares its
own — used to populate the dev voice picker. Default empty (a driver that hasn't declared voices
yields no picker options, falling back to the configured/default voice).
NOTE: this is the near-term, driver-owned source of truth. Long term this should move to metadata so providers that let users add their OWN voices (e.g. ElevenLabs) can be enumerated dynamically.
The supported voice ids (id + human label), or [] when none are declared.
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.
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.