Skip to content

Conversation

@izakfilmalter
Copy link
Contributor

@izakfilmalter izakfilmalter commented Jan 6, 2026

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Prompt.fromResponseParts doesn't copy metadata to options when converting Response.ToolCallPart and Response.ToolResultPart to prompt parts.
This breaks multi-turn tool calls with Google's Gemini API, which requires thoughtSignature (stored in metadata.google.thoughtSignature) to be present in follow-up requests. Without this fix, Gemini returns a 400 error: "Function call is missing a thought_signature in functionCall parts."
The fix adds options: part.metadata when creating tool-call and tool-result parts in fromResponseParts.

Related

@izakfilmalter izakfilmalter requested a review from IMax153 as a code owner January 6, 2026 18:46
@github-project-automation github-project-automation bot moved this to Discussion Ongoing in PR Backlog Jan 6, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2026

⚠️ No Changeset found

Latest commit: 09a27da

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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

Labels

None yet

Projects

Status: Discussion Ongoing

Development

Successfully merging this pull request may close these issues.

fromResponseParts drops metadata when converting tool-call/tool-result parts

1 participant