Skip to content

Conversation

@AstraBert
Copy link
Member

Adding ToolCallBlock support in GoogleGenAI integration (e2e tested)

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 16, 2025
"id": part.function_call.id if part.function_call.id else "",
"name": part.function_call.name,
"args": part.function_call.args,
"thought_signature": part.thought_signature,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might be losing thought signatures here? Although not totally sure either

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we might be, but ToolCallBlock does not have something that could properly handle the signature and I did not want to open it to additional_kwargs chaos... Although I can do that if we think it is necessary

@logan-markewich
Copy link
Collaborator

I'm still seeing some weird behaviour

  1. In the chat history, empty blocks are added
ChatMessage(role=<MessageRole.ASSISTANT: 'assistant'>, additional_kwargs={'thought_signatures': []}, blocks=[ToolCallBlock(block_type='tool_call', tool_call_id='', tool_name='get_the_greeting', tool_kwargs={}), TextBlock(block_type='text', text=''), ThinkingBlock(block_type='thinking', content='', num_tokens=None, additional_information={})])
  1. Setting a breakpoint in def _astream_chat() just before calling gemini, in an agent loop, I see multiple duplicated tool calls somehow, not sure why 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants