Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions livekit-plugins/livekit-plugins-google/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ And these on Vertex AI:

- gemini-live-2.5-flash-native-audio

### Gemini 3.1 instructions

Gemini 3.1 Live does not allow system instructions to be changed after the
session has started. Calls such as `AgentSession.update_instructions()` and
`session.generate_reply(instructions=...)` are ignored for
`gemini-3.1-flash-live-preview`.

For dynamic behavior with Gemini 3.1, prefer starting a new session with the
updated instructions. For turn-specific context, include the extra context in
the user message or a tool result before the model responds instead of relying
on mid-session instruction updates.

References:

- [Gemini API Models](https://ai.google.dev/gemini-api/docs/models)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ def __init__(

Args:
instructions (str, optional): Initial system instructions for the model. Defaults to "".
Gemini 3.1 Live models do not support mid-session instruction updates;
start a new session with updated instructions, or pass turn-specific context
in user/tool content before the model responds.
api_key (str, optional): Google Gemini API key. If None, will attempt to read from the environment variable GOOGLE_API_KEY.
modalities (list[Modality], optional): Modalities to use, such as ["TEXT", "AUDIO"]. Defaults to ["AUDIO"].
model (str, optional): The name of the model to use. Defaults to "gemini-2.5-flash-native-audio-preview-12-2025" or "gemini-live-2.5-flash-native-audio" (vertexai).
Expand Down
Loading