Skip to content

Conversation

@yunhao-tech
Copy link

Problem

Gemini 3 uses thought signatures to maintain reasoning context across API calls. These signatures are encrypted representations of the model's internal thinking process. To ensure the model retains its reasoning capabilities, users must return these signatures unchanged in subsequent requests to the model.

Currently, the ToolCall struct in eino does not have a field to store this thought signature, making it impossible to properly support Gemini 3's reasoning context preservation feature.

Solution

Add a ThoughtSignature field to the ToolCall struct to store Gemini 3's thought signature. This field will be:

Serialized as thought_signature in JSON
Treated as an atomic field (not split across streaming chunks)
Properly merged during stream concatenation
Implementation

schema/message.go: Added ThoughtSignature field and updated concatToolCalls

@CLAassistant
Copy link

CLAassistant commented Dec 9, 2025

CLA assistant check
All committers have signed the CLA.

@yunhao-tech yunhao-tech marked this pull request as draft December 9, 2025 12:04
@yunhao-tech yunhao-tech marked this pull request as ready for review December 9, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants