fix: handle Gemini Live 2.5 quirks when re-seeding context on reconnect
Extends the reconnect re-seeding fix to work cleanly on Gemini Live 2.5, which has stricter seed requirements than 3.x and a documented audio-input / history-recall limitation. Both initial connection and reconnect now share a single code path (`_create_initial_response(for_reconnect=...)`), with four well-documented cases. On Gemini 2.5 reconnect, `turn_complete=True` is now forced on the seed so the model produces a recap-style response immediately instead of briefly acting "forgetful" on the user's next utterance — the latter being especially jarring mid-conversation. When a 2.5 seed doesn't already end with a user turn (e.g. the bot had finished speaking before the disconnect), a blank user turn is appended to satisfy the server's seed-shape requirement. Gemini 3.x needs neither workaround.
This commit is contained in:
@@ -1,3 +1 @@
|
||||
Fixed Gemini Live losing conversation history on WebSocket reconnect. When the session
|
||||
reconnects (e.g. on system instruction change), conversation history is now re-seeded
|
||||
into the new session before it is marked ready for input.
|
||||
Fixed Gemini Live losing conversation history in the (rare) case of a WebSocket reconnect before any session resumption handle is received. When the session reconnects (e.g. on system instruction change), conversation history is now re-seeded into the new session before it is marked ready for input.
|
||||
|
||||
Reference in New Issue
Block a user