You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Node.js (ws library, raw WebSocket, no SDK)
Bug Description
The model sends serverContent.turnComplete: true in the middle of generating a response, causing audio output to stop mid-sentence. The model was clearly not finished speaking — the sentence is grammatically incomplete, the thought is unfinished — but turnComplete fires and audio generation stops.
This is different from interruption (serverContent.interrupted) — no caller speech triggers this. The model spontaneously decides the turn is complete when it clearly isn't.
Examples from Production
Inbound call (3 seconds, unknown outcome):
Transcript: AI Agent: Hi, thanks for calling [Company]! This
Model sent turnComplete mid-sentence. "This" is clearly not a complete thought.
Inbound call (1 second, unknown outcome):
Transcript: AI Agent: Hi, thanks
Model cut off after 2 words of a greeting.
Inbound call (6 seconds, unknown outcome):
Transcript: AI Agent: Hi, thanks for calling [Company]! This is how can I help you?
Full greeting delivered, but model sent turnComplete before processing the caller's response.
Frequency
In a 14-day window with 603 calls, we observed 11 inbound calls with outcome: unknown where the transcript shows Gemini's greeting was cut short or Gemini failed to respond after the caller spoke. Several of these show clear mid-sentence termination in the transcript.
Correlation with contextWindowCompression
Other developers have reported that contextWindowCompression: { slidingWindow: {} } correlates with increased premature turnComplete frequency. See googleapis/js-genai#707 (44 comments, Priority P2, open since June 2025). We currently have contextWindowCompression enabled and are considering removing it.
Expected Behavior
turnComplete should only fire when the model has finished generating its complete response — a grammatically complete sentence or thought. Mid-word or mid-sentence turnComplete should never occur.
Questions for the Team
Is premature turnComplete a known issue on gemini-3.1-flash-live-preview?
Does contextWindowCompression: { slidingWindow: {} } affect turnComplete timing?
Is there a way to distinguish between legitimate turnComplete and premature termination?
Environment
gemini-3.1-flash-live-previewLedawss://generativelanguage.googleapis.com/ws/.../BidiGenerateContentwslibrary, raw WebSocket, no SDK)Bug Description
The model sends
serverContent.turnComplete: truein the middle of generating a response, causing audio output to stop mid-sentence. The model was clearly not finished speaking — the sentence is grammatically incomplete, the thought is unfinished — butturnCompletefires and audio generation stops.This is different from interruption (
serverContent.interrupted) — no caller speech triggers this. The model spontaneously decides the turn is complete when it clearly isn't.Examples from Production
Inbound call (3 seconds, unknown outcome):
AI Agent: Hi, thanks for calling [Company]! ThisturnCompletemid-sentence. "This" is clearly not a complete thought.Inbound call (1 second, unknown outcome):
AI Agent: Hi, thanksInbound call (6 seconds, unknown outcome):
AI Agent: Hi, thanks for calling [Company]! This is how can I help you?turnCompletebefore processing the caller's response.Frequency
In a 14-day window with 603 calls, we observed 11 inbound calls with
outcome: unknownwhere the transcript shows Gemini's greeting was cut short or Gemini failed to respond after the caller spoke. Several of these show clear mid-sentence termination in the transcript.Correlation with contextWindowCompression
Other developers have reported that
contextWindowCompression: { slidingWindow: {} }correlates with increased prematureturnCompletefrequency. See googleapis/js-genai#707 (44 comments, Priority P2, open since June 2025). We currently havecontextWindowCompressionenabled and are considering removing it.Expected Behavior
turnCompleteshould only fire when the model has finished generating its complete response — a grammatically complete sentence or thought. Mid-word or mid-sentenceturnCompleteshould never occur.Questions for the Team
turnCompletea known issue ongemini-3.1-flash-live-preview?contextWindowCompression: { slidingWindow: {} }affectturnCompletetiming?turnCompleteand premature termination?Related Issues