When using function calling, Gemini API sends a text response along with function call

Same issue here, I’m not using StreamingResponse but models.generateContent.

Used to work no problem, then text only is returned. Fine we can handle it somehow, but it’s so unpredictable and not sure how it will change in the next iteration of the model.

Reported it here: Very frustrating experience with Gemini 2.5 function calling performance
Like/comment so it gets visibility and maybe someone will take care of this.

Difficult to trust this API despite being on paper good.