Skip to content

fix: copy ThoughtSignature in generateRequestConfirmationEvent#659

Open
majiayu000 wants to merge 1 commit intogoogle:mainfrom
majiayu000:fix/issue-656-copy-thought-signature-in-confirmation
Open

fix: copy ThoughtSignature in generateRequestConfirmationEvent#659
majiayu000 wants to merge 1 commit intogoogle:mainfrom
majiayu000:fix/issue-656-copy-thought-signature-in-confirmation

Conversation

@majiayu000
Copy link
Copy Markdown
Contributor

Fixes #656

generateRequestConfirmationEvent uses utils.FunctionCalls() which extracts only *genai.FunctionCall from parts, discarding the ThoughtSignature field on the parent *genai.Part. When building the new adk_request_confirmation Part, ThoughtSignature was never copied.

Fix: build an additional map from FunctionCall.ID to ThoughtSignature by iterating over functionCallEvent.Content.Parts directly. When creating the new genai.Part, look up and set the ThoughtSignature from this map.

Added test case in TestGenerateRequestConfirmationEvent to verify ThoughtSignature is preserved.

The function was using utils.FunctionCalls() which extracts only
*genai.FunctionCall from parts, discarding the ThoughtSignature
field on the parent *genai.Part. Build a map from FunctionCall.ID
to ThoughtSignature and set it on the new confirmation Part.

Fixes google#656

Signed-off-by: majiayu000 <[email protected]>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@majiayu000 majiayu000 marked this pull request as ready for review March 18, 2026 04:50
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

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.

Missing ThoughtSignature on adk_request_confirmation parts breaks execution

1 participant