Gemini 3.1 Flash Live not working with LiveKit Agents 1.5.1

We upgraded to gemini-3.1-flash-live-preview with livekit-agents and livekit-plugins-google v1.5.1. Two main issues:

  1. generate_reply() crashes with 1007 WebSocket error — Gemini 3.1 rejects send_client_content which the plugin uses internally. It should use send_realtime_input instead.

  2. update_instructions() also fails with 1007 — same root cause.

Basically anything that uses send_client_content breaks on Gemini 3.1 since Google changed the API contract — only send_realtime_input works now (except for initial history seeding).

We see PRs #5233, #5251, #5262 addressing this — any ETA on a release that includes these fixes?

any ETA on a release that includes these fixes?

Unfortunately, since this depends on changes to the model, I can’t give an ETA. I did find this other ticket, generate_reply times out on first dialogue with gemini-3.1-flash-live-preview — works fine with gemini-2.5-flash- · Issue #5260 · livekit/agents · GitHub, which you missed from your list :slight_smile: and looks to be the most active / likely to receive updates if things change.

1 Like

Hey Darryn, just a question, what do you mean by depends on changes to the model? Do we need to wait for google to release an update so it works on livekit? I just want to understand so I can see if we are going to deploy it to production soon or not.

From what I understand, the same features of action to the model work, but with different mediums to process them. https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-live-preview. Is this migration not feasible for LiveKits system?

Hey Filippo, I was attempting to summarise DavidZhao’s response in the issue I linked, generate_reply times out on first dialogue with gemini-3.1-flash-live-preview — works fine with gemini-2.5-flash- · Issue #5260 · livekit/agents · GitHub (David is our CTO)

confirmed with gemini team that this is a temporary limitation with the model. they are working on improving the behavior on their side. in the next version we’ll raise an explicit error in generate_reply to make the issue more clear

Since my last reply, the docs team have added an additional section to the Gemini Realtime docs with additional detail about the limitations and a migration guide: Gemini Live API plugin | LiveKit Documentation

I wanted to find something I could share with you to show progress for ‘they are working on…’ but I can’t find anything I’m afraid.

The model comparison at https://ai.google.dev/gemini-api/docs/live-api/capabilities#model-comparison shows what changed between the two to cause this.