Problem
Since livekit-plugins-google 1.5.3, calling session.update_instructions() on a session using gemini-3.1-flash-live-preview emits:
update_instructions is not compatible with 'gemini-3.1-flash-live-preview' and will be ignored.
Per PR #5332, this is an intentional guard around a server-side Gemini 3.1 restriction (send_client_content rejected with WS 1007 after the first model turn).
What's missing
Production use cases need to update an agent's behavior mid-call (escalation prompts, language switching, context-aware tool enable/disable). On Gemini 2.5 we used update_instructions for this. On 3.1 there is no documented alternative.
Request
- Document the limitation in the plugin README +
RealtimeModel docstring.
- Provide a recommended pattern for dynamic prompts on 3.1:
- End session + restart with updated instructions?
- Inject context via tool result?
session.generate_reply(instructions=...) for per-turn instructions?
- Emit the warning once per session, not once per call — current verbosity pollutes production logs.
Reproduction
Any session on gemini-3.1-flash-live-preview calling await session.update_instructions("new") emits the warning; behavior is silently a no-op.
Environment
livekit-agents[google] 1.5.2-1.5.4
gemini-3.1-flash-live-preview
- LiveKit Cloud (eu-central)
Problem
Since
livekit-plugins-google1.5.3, callingsession.update_instructions()on a session usinggemini-3.1-flash-live-previewemits:Per PR #5332, this is an intentional guard around a server-side Gemini 3.1 restriction (
send_client_contentrejected with WS 1007 after the first model turn).What's missing
Production use cases need to update an agent's behavior mid-call (escalation prompts, language switching, context-aware tool enable/disable). On Gemini 2.5 we used
update_instructionsfor this. On 3.1 there is no documented alternative.Request
RealtimeModeldocstring.session.generate_reply(instructions=...)for per-turn instructions?Reproduction
Any session on
gemini-3.1-flash-live-previewcallingawait session.update_instructions("new")emits the warning; behavior is silently a no-op.Environment
livekit-agents[google]1.5.2-1.5.4gemini-3.1-flash-live-preview