Fix Gemini Live session resumption hanging after reconnect

After a reconnect, _ready_for_realtime_input was never set back to True
because _create_initial_response (which sets the flag) is only called on
initial connection. This caused all audio/video/text to be silently
dropped after reconnecting, making the bot appear to hang.

Set the flag in _handle_session_ready when we detect a reconnect, either
via session_resumption_handle (server restores state) or via existing
context (rare case where connection drops before first resumption handle).
This commit is contained in:
Paul Kompfner
2026-04-03 16:30:03 -04:00
parent 9df1e18b43
commit f11b6d7151
2 changed files with 19 additions and 4 deletions

1
changelog/4242.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed Gemini Live bot hanging after a session resumption reconnect. Audio, video, and text input were silently dropped after reconnecting because the internal `_ready_for_realtime_input` flag was not being reset.