Skip to content

Gemini on google-genai: Incorrect handling when responses contain both text and function call parts #5007

@q-nathangrand

Description

@q-nathangrand

Bug description

Same issue as #4596 but with google-genai 'model'.

Multiple parts can be returned, including some with text and some with function calls.

The code currently drops all function calls if a part without function calls exists.

Expected behavior

Both function calls and text should be accumulated into the AssistantMessage

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions