@ai-sdk/google
Advanced tools
+1
-1
| { | ||
| "name": "@ai-sdk/google", | ||
| "version": "3.0.98", | ||
| "version": "3.0.99", | ||
| "license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -316,2 +316,4 @@ import { | ||
| let modelResponseHasSignedFunctionCall = false; | ||
| contents.push({ | ||
@@ -379,14 +381,23 @@ role: 'model', | ||
| : undefined; | ||
| // For Gemini 3, every replayed functionCall part must carry a | ||
| // thoughtSignature or the API returns HTTP 400. If the upstream | ||
| // serialization layer dropped the signature, inject the | ||
| // documented sentinel so the request still succeeds. | ||
| const isServerToolCall = | ||
| serverToolCallId != null && serverToolType != null; | ||
| const shouldSkipMissingSignatureMitigation = | ||
| // Gemini 3 returns a single signature for a parallel | ||
| // function-call response on the first standard function | ||
| // call. Subsequent standard function calls in the same | ||
| // model response legitimately have no signature. | ||
| !isServerToolCall && | ||
| thoughtSignature == null && | ||
| modelResponseHasSignedFunctionCall; | ||
| const effectiveThoughtSignature = | ||
| thoughtSignature ?? | ||
| (isGemini3Model | ||
| (isGemini3Model && !shouldSkipMissingSignatureMitigation | ||
| ? injectSkipSignature(part.toolName) | ||
| : undefined); | ||
| if (serverToolCallId && serverToolType) { | ||
| if (!isServerToolCall && thoughtSignature != null) { | ||
| modelResponseHasSignedFunctionCall = true; | ||
| } | ||
| if (isServerToolCall) { | ||
| return { | ||
@@ -393,0 +404,0 @@ toolCall: { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
3115578
0.22%34078
0.17%