Skip to content

Conversation

Copy link

Copilot AI commented Jan 10, 2026

🎯 Changes

Gemini 3.0 models require thought signatures from function calls to be preserved and sent back in subsequent requests. Without this, the API returns a 400 validation error.

The implementation was already complete in the previous commit. This PR adds comprehensive test coverage to verify:

  • Thought signatures are captured from Gemini responses into ToolCall.metadata
  • Signatures are correctly sent back to the API in follow-up messages
  • The full request/response cycle maintains compatibility with Gemini 3.0
// When Gemini returns a function call with thoughtSignature
{
  functionCall: {
    name: 'get_weather',
    args: { location: 'Paris' }
  },
  thoughtSignature: 'thought_abc123'
}

// It's preserved in metadata
toolCall.metadata = { thoughtSignature: 'thought_abc123' }

// And sent back in subsequent requests
{
  functionCall: { ... },
  thoughtSignature: 'thought_abc123'  // Required by Gemini 3.0
}

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cloud.nx.app
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/ai/ai/node_modules/.bin/../nx/bin/nx.js run-many --targets=build --exclude=examples/** b (dns block)
  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/143.0.7499.4/linux64/chrome-headless-shell-linux64.zip
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/ai/ai/node_modules/.pnpm/playwright-core@1.57.0/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js (http block)
  • https://storage.googleapis.com/chrome-for-testing-public/143.0.7499.4/linux64/chrome-linux64.zip
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/ai/ai/node_modules/.pnpm/playwright-core@1.57.0/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Pull request: #1


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: amacsmith <25642759+amacsmith@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation structure for better navigation test(gemini): add verification for thought signature preservation Jan 10, 2026
Copilot AI requested a review from amacsmith January 10, 2026 19:55
@amacsmith amacsmith marked this pull request as ready for review January 14, 2026 18:27
Copilot AI review requested due to automatic review settings January 14, 2026 18:27
@amacsmith amacsmith merged commit b9f607d into claude/review-tanstack-issues-gsVtQ Jan 14, 2026
6 checks passed
@amacsmith amacsmith deleted the copilot/update-documentation-structure branch January 14, 2026 18:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive test coverage for the thought signature preservation feature required by Gemini 3.0 models. The feature itself was already implemented; this PR verifies that thought signatures are correctly captured from API responses and sent back in subsequent requests to maintain API compatibility.

Changes:

  • Added a new integration test that validates the complete thought signature round-trip flow
  • Tests both capturing thought signatures from function call responses and sending them back in follow-up requests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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