function calling is not working for gemini-2.5-flash-preview-native-audio-dialog
function calling is not working for gemini-2.5-flash-preview-native-audio-dialog model selection. Please fix it. Because this model can support many languages.
this is a model issue.. please file the issue with Google Gemini
this is a model issue.. please file the issue with Google Gemini
Could you point me to where I should open an issue? I'll gladly do it but what repo? Gemini realtime somewhere?
I'm not certain as this is Google.. but https://github.com/googleapis/python-genai might be a good spot
Thx!
https://github.com/googleapis/python-genai/issues/843
Hi @davidzhao according to https://github.com/googleapis/python-genai/issues/843 they asking to set response_modalities to AUDIO.
Can you look into that? Better if you can enable all genai SDK features for LiveKit as well.
yup, it's always been set to AUDIO. see code
@davidzhao They're saying it should work, not sure if you could step in here? https://github.com/googleapis/python-genai/issues/843#issuecomment-2905784742
will reopen the issue and debug on our side to see if it's a genai version issue.
validated that the livekit side is sending it the right tool definitions. It does look like tool calls works sometimes.. other times the model seems to ignore it. I updated to the latest genai version in #2390, but it's unclear if that helps.
furthermore, there's confirmation that this is reproducible with Google's ADK as well.
based on the comment, it seems that the model has trouble calling functions for native audio input.
I can confirm it is still not working tools are not being called when using
"gemini-2.5-flash-preview-native-audio-dialog"
but they do work when using
"gemini-2.5-flash-exp-native-audio-thinking-dialog"
if anyone finds a way to fix this please sure this new model is really a few steps ahead of everything else we want to get this into production
@davidzhao
I tested google-genai 1.17.0 Seems to preform better 4/10 times the tool calling gets executed compared to 1/10 with 1.16.1
I'v been digging into this for a few hours i can't to find the source of the issue.
"gemini-2.0-flash-live-001" <-- works perfectly fine 10/10 times "gemini-2.5-flash-preview-native-audio-thinking-dialog" <-- works 7/10 times
"gemini-2.5-flash-preview-native-audio-dialog" <-- Does not work consistent or anywhere close
Update:
Tool Calling using
"https://aistudio.google.com"
using "gemini-2.5-flash-preview-native-audio-thinking-dialog"
Now works every single time.
But still not working using the API, its not a model problem it has something to do with genai sdk or livekit sdk
the difference might be transcripts.. can you try livekit while disabling input or output audio transcripts?
@davidzhao
you mean inside session.start? room_output_options=RoomOutputOptions(transcription_enabled=True)
no. in model options
RealtimeModel(
input_audio_transcription=None,
output_audio_transcription=None,
)
@davidzhao
Tried with
input_audio_transcription=None,
output_audio_transcription=None,
No change still not executing the tool calls.
Also tried with the latest "google-genai==1.18.0" (released yesterday) still no change
I think there is an issue in how livekit is initiating the tool call in the gemini live sdk rather then the gemini live sdk itself.
I think there is an issue in how livekit is initiating the tool call in the gemini live sdk rather then the gemini live sdk itself.
That is highly unlikely due to:
- the same code works with Gemini 2.0 flash
- the issue is confirmed without using agents framework
@davidzhao
I got this response from google
"try enabling grounding with google search. For us it worked. It probably triggers their python env in the backend while the function calling doesn't (probably a bug on their end)."
Is enabling grounding with google search supported in the livekit sdk ?
+1!
I got this response from google
"try enabling grounding with google search. For us it worked. It probably triggers their python env in the backend while the function calling doesn't (probably a bug on their end)."
Is enabling grounding with google search supported in the livekit sdk ?
@mercuryyy , When grounding is enabled , does this work 10/10 times?