fix: Improve Gemini Live model provider#25
Conversation
| yield provider_event | ||
| # Convert to provider-agnostic format (always returns list) | ||
| for event in self._convert_gemini_live_event(message): | ||
| yield event |
There was a problem hiding this comment.
I think to start it is okay to return the tool uses one at a time (we will execute them concurrently). But if a model supports returning multiple tool uses at once, we should give users the ability to control the execution pattern just as we do for uni agents. It may be that a user wants the tool uses processed sequentially for example.
There was a problem hiding this comment.
that makes sense, but I wanted to start by reusing our tool events. I think later on, we can introduce list of tool events as another event? releasing this right now is not one way door, so i'd be in favor of going forward now, and taking it as a feature request after launch.
So far, I have not seen any model return multiple tool uses, it's always different events
Description
This PR fixes critical issues in the Gemini Live bidirectional streaming implementation that were preventing proper audio streaming and transcription functionality.
Key Changes
Fixed "non-text parts in the response" warning
message.server_content.model_turn.partsinstead of deprecatedmessage.textpropertymessage.data) before text to avoid triggering SDK warnings on mixed contentUpdated default model to support bidirectional streaming
models/gemini-2.0-flash-live-preview-04-09togemini-2.5-flash-native-audio-preview-09-2025Enabled transcription by default
live_configwithoutputAudioTranscriptionandinputAudioTranscriptionenabledImproved error handling
ErrorEventinstead ofNonefor better error propagation and debuggingRe-enabled Gemini Live in integration tests
Issues Resolved