Skip to content

Conversation

@ezequiel-safirsztein-momentum

What:

  • Bug Fix
  • New Feature

Description:

This PR introduces support for the ⁠extra_content field, which is returned by certain Gemini models (specifically those utilizing the reasoning signature) during tool calls.
When interacting with these models, the API provides ⁠extra_content alongside tool calls. To maintain the integrity of the conversation and satisfy the model's reasoning signature requirements, this content must be preserved and passed back to the API when submitting tool outputs.
Changes:
• Updated the response handling to parse and expose ⁠extra_content from tool call responses.

• Updated the payload builder to include ⁠extra_content when submitting tool outputs back to the model.

@ezequiel-safirsztein-momentum ezequiel-safirsztein-momentum changed the title add support for extra_content in chat response tool calls add support for extra_content in chat response tool calls returned by Gemini models Nov 27, 2025
@iBotPeaches
Copy link
Collaborator

Could we keep the error changes and this change split? Tackling a unified Gemini error thing is a bit more difficult and I wouldn't want it caught up with this extra content.

You can see outstanding questions for Gemini errors in this PR: #693

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants