# Livekit interrupt logic

**URL:** <https://community.livekit.io/t/livekit-interrupt-logic/1653>\
**Category:** Telephony\
**Tags:** agent-development, noise-cancellation\
**Created:** [July 15, 2026, 10:59am UTC](https://community.livekit.io/t/livekit-interrupt-logic/1653 "2026-07-15T10:59:40Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)\
**Post date:** [July 16, 2026, 10:24am UTC](https://community.livekit.io/t/livekit-interrupt-logic/1653/6 "2026-07-16T10:24:41Z")

</div>

> Is there a public tracking issue for the “long-term fix being investigated” mentioned in the docs

Yes, it dates from when we first launched Gemini 3.1 and is here:

> <https://github.com/livekit/agents/issues/5260>
>
> \### Bug Description
> 
> When using gemini-3.1-flash-live-preview as the realtime mo…del, the agent fails to generate the first reply immediately after joining the room. It times out waiting for the generation\_created event. The exact same code with gemini-2.5-flash works without any issues.
> 
> \### Expected Behavior
> 
> Agent should generate and speak the first reply immediately after joining the room, same as it does with gemini-2.5-flash
> 
> \### Reproduction Steps
> 
> \`\`\`bash
> 1.Create an AgentSession with google.realtime.RealtimeModel using model gemini-3.1-flash-live-preview
> 2.Start the session with session.start()
> 3.Call session.generate\_reply() for the opening dialogue
> 
> \`\`\`
> 
> \### Minimal Reproducible Example
> \`\`\`bash
> from livekit import agents
> from livekit.plugins import google, silero
> from livekit.agents import AgentSession
> 
> @server.rtc\_session(agent\_name="my-agent")
> async def my\_agent(ctx: agents.JobContext):
> session = AgentSession(
> llm=google.realtime.RealtimeModel(
> model="gemini-3.1-flash-live-preview", # ❌ fails
> voice="Puck",
> ),
> vad=silero.VAD.load(),
> )
> 
> await session.start(ctx.room, participant=ctx.room.remote\_participants)
> await session.generate\_reply(
> instructions="Greet the user."
> )
> \`\`\`
> 
> \### Operating System
> 
> Windows11
> 
> \### Models Used
> 
> gemini-3.1-flash-live-preview
> 
> \### Package Versions
> 
> \`\`\`bash
> livekit-agents==1.5.1
> \`\`\`
> 
> \### Logs
> \`\`\`bash
> ERROR… livekit.…ns.google error in receive task: 1007 None.
> Request contains an invalid argument.
> 
> websockets.exceptions.ConnectionClosedError:
> received 1007 (invalid frame payload data) Request contains an invalid argument.;
> then sent 1007 (invalid frame payload data) Request contains an invalid argument.
> 
> google.genai.errors.APIError: 1007 None. Request contains an invalid argument.
> 
> ERROR… livekit.agents failed to generate a reply:
> generate\_reply timed out waiting for
> generation\_created event.
> 
> WARNI… livekit.…ns.google received server content but no active generation.
> \`\`\`

The best conversation in the community at the time is here:

> [@Gemini 3.1 Flash Live not working with LiveKit Agents 1.5.1](https://community.livekit.io/t/gemini-3-1-flash-live-not-working-with-livekit-agents-1-5-1/757/4):
>
> 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](https://github.com/livekit/agents/issues/5260#issuecomment-4160219112) (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 Si…

Obviously you are aware of this possibility, but another option is to explore a different model, or (pipeline) architecture. This would give you a lot more flexibility and choice.

---

_[View the full topic](https://community.livekit.io/t/livekit-interrupt-logic/1653)._
