Skip to content

BYOK Gemini 3.x models fail on tool calling — thought_signature not included in function call responses #318970

Description

@akashyxp

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.122.1
  • OS Version: Ubuntu 22.04

Problem: Gemini 3.5 Flash and 3.1 Flash-Lite work for basic chat, but fail on the second turn of any agent interaction with:

"Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly."

The first request succeeds with finish_reason: tool_calls, but when VS Code sends the tool result back, the request is rejected because thought_signature (returned by Gemini in the first response) is not echoed back.

Expected: VS Code should preserve and echo back thought_signature fields from model responses when sending tool results in subsequent turns, per Google's docs.

Impact: Gemini 3.x models cannot be used in Agent mode via BYOK. They work in Ask mode (no tools).

Steps to Reproduce:

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable buggeminiIssues related to the experience with Google Gemini modelsmodel-byokverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions