You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Gemini's parse_provider_response method does not handle multiple text parts. Now, I do not know why on earth the genapi/API returns multiple parts only containing "text" to begin with, but it does..
The current implementation goes through each part and assigns a part with "text" as the content, actually only assigning the last part as the message. As said I don't know why the response would be like this, but the current assumption of there being only one text part is clearly wrong.
Steps to Reproduce
Get the model to generate a response like this and check the incoming data.
Agent Configuration (if applicable)
No response
Expected Behavior
Text parts should be concatenated and returned as the response's content.
Actual Behavior
Only the last part is reported as the response's content.
Screenshots or Logs (if applicable)
No response
Environment
Anything capable of using the library
Possible Solutions (optional)
See above.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Some additional info: This is with Gemini 2.5 pro (gemini-2.5-pro-preview-05-06). AI being what it is it now happens only irregularly.. Still, handling this case in the code would account for it.
Description
The Gemini's parse_provider_response method does not handle multiple text parts. Now, I do not know why on earth the genapi/API returns multiple parts only containing "text" to begin with, but it does..
Example of a response as seen from HTTP logs:
The current implementation goes through each part and assigns a part with "text" as the content, actually only assigning the last part as the message. As said I don't know why the response would be like this, but the current assumption of there being only one text part is clearly wrong.
Steps to Reproduce
Get the model to generate a response like this and check the incoming data.
Agent Configuration (if applicable)
No response
Expected Behavior
Text parts should be concatenated and returned as the response's content.
Actual Behavior
Only the last part is reported as the response's content.
Screenshots or Logs (if applicable)
No response
Environment
Possible Solutions (optional)
See above.
Additional Context
No response
The text was updated successfully, but these errors were encountered: