mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: include thought signatures for gemini-3-pro native tool calls
Gemini 3.0-pro requires thought_signature field in functionCall parts even when reasoning is not enabled. This fix ensures that thought signatures are always included for gemini-3-pro models when using native tool calls to prevent "Function call is missing a thought_signature" errors. Fixes #9499
This commit is contained in:
parent
2ca9eac9e0
commit
d941b6f670
1 changed files with 5 additions and 1 deletions
|
|
@ -86,7 +86,11 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
|
|||
// Only forward encrypted reasoning continuations (thoughtSignature) when we are
|
||||
// using reasoning (thinkingConfig is present). Both effort-based (thinkingLevel)
|
||||
// and budget-based (thinkingBudget) models require this for active loops.
|
||||
const includeThoughtSignatures = Boolean(thinkingConfig)
|
||||
// EXCEPTION: Gemini 3.0-pro requires thought signatures for ALL native tool calls,
|
||||
// even when reasoning is not enabled.
|
||||
const isGemini3Pro = model.includes("gemini-3-pro")
|
||||
const hasNativeTools = metadata?.tools && metadata.tools.length > 0
|
||||
const includeThoughtSignatures = Boolean(thinkingConfig) || (isGemini3Pro && hasNativeTools)
|
||||
|
||||
// The message list can include provider-specific meta entries such as
|
||||
// `{ type: "reasoning", ... }` that are intended only for providers like
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue