Generate reply timeout for gemini-live-2.5-flash-native-audio realtime model

@livekit @LiveKit-Community @livekitteams @darryncampbell @CWilson @Muhammad_Usman_Bashir
Hi LiveKit Team,

We are experiencing intermittent timeouts while using the Gemini Live 2.5 Flash Native Audio realtime model via Vertex AI with LiveKit Agents.

Environment:

  • LiveKit Agents Version: 1.5.17
  • Model: gemini-live-2.5-flash-native-audio

Error observed:

failed to generate a reply: generate_reply timed out waiting for generation_created event

The issue occurs during response generation, where the agent waits for the generation_created event but eventually times out.

We would like to understand:

  1. Is this a known issue with Gemini Live 2.5 Flash Native Audio integration?

  2. Are there any recommended configuration changes, timeout settings, or code adjustments required when using this model with LiveKit Agents?

  3. Have there been any fixes or improvements in versions newer than 1.5.17 related to realtime Gemini models?

    Any guidance would be greatly appreciated.

There’s a known issue with Gemini Live 3.1 generate_reply, but no known issue with Gemini Live 2.5.

This issue appears to be a similar report:

But that fix was implemented months ago now.

How can this be reproduced? Also, was this working for you in a previous version, and this is a regression with the latest release?

@Harshita_Sukumar_Patil The timeout is mechanical, not model-specific. generate_reply sends a placeholder turn-complete to trigger a generation, then waits a fixed 5 seconds for the generation_created event; if it doesn’t arrive you get exactly that error ( realtime_api.py#L772 ). On 2.5 the call is active ( the “not compatible, ignored” path is the 3.1 case, realtime_api.py#L734 ), so a timeout means Gemini accepted the request but no generation opened within those 5 seconds.

For an intermittent 2.5 timeout, the cause the plugin code itself flags is a session restart racing your call: on reconnect it drains queued messages and, if it drops a turn_complete, logs “discarding client content for turn completion, may cause generate_reply timeout” ( realtime_api.py#L530 ). Vertex Live sessions recycle periodically, so a generate_reply landing during a reconnect loses its trigger turn and hits the timeout. If that warning shows up in your agent logs right before the failures, that’s the cause, and the repro is forcing a reconnect while a generate_reply is in flight.

Recent google-realtime fixes since 1.5.17 are Gemini-3-Flash detection ( PR #6210 ), not a 2.5 generate_reply change, so upgrading isn’t a targeted fix here.