You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@ai-sdk/google

Package Overview
Dependencies
Maintainers
3
Versions
395
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/google - npm Package Compare versions

Comparing version
3.0.37
to
3.0.38
+6
-0
CHANGELOG.md
# @ai-sdk/google
## 3.0.38
### Patch Changes
- 2291047: fix(ai): fix missing support for image thought signatures (e.g. for Gemini image models)
## 3.0.37

@@ -4,0 +10,0 @@

+21
-1

@@ -1137,6 +1137,26 @@ "use strict";

} else if ("inlineData" in part) {
if (currentTextBlockId !== null) {
controller.enqueue({
type: "text-end",
id: currentTextBlockId
});
currentTextBlockId = null;
}
if (currentReasoningBlockId !== null) {
controller.enqueue({
type: "reasoning-end",
id: currentReasoningBlockId
});
currentReasoningBlockId = null;
}
const thoughtSignatureMetadata = part.thoughtSignature ? {
[providerOptionsName]: {
thoughtSignature: part.thoughtSignature
}
} : void 0;
controller.enqueue({
type: "file",
mediaType: part.inlineData.mimeType,
data: part.inlineData.data
data: part.inlineData.data,
providerMetadata: thoughtSignatureMetadata
});

@@ -1143,0 +1163,0 @@ }

@@ -1126,6 +1126,26 @@ // src/google-generative-ai-language-model.ts

} else if ("inlineData" in part) {
if (currentTextBlockId !== null) {
controller.enqueue({
type: "text-end",
id: currentTextBlockId
});
currentTextBlockId = null;
}
if (currentReasoningBlockId !== null) {
controller.enqueue({
type: "reasoning-end",
id: currentReasoningBlockId
});
currentReasoningBlockId = null;
}
const thoughtSignatureMetadata = part.thoughtSignature ? {
[providerOptionsName]: {
thoughtSignature: part.thoughtSignature
}
} : void 0;
controller.enqueue({
type: "file",
mediaType: part.inlineData.mimeType,
data: part.inlineData.data
data: part.inlineData.data,
providerMetadata: thoughtSignatureMetadata
});

@@ -1132,0 +1152,0 @@ }

+1
-1
{
"name": "@ai-sdk/google",
"version": "3.0.37",
"version": "3.0.38",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -567,3 +567,27 @@ import {

} else if ('inlineData' in part) {
// End any active text or reasoning block before starting file output.
// Relevant for multimodal output models.
if (currentTextBlockId !== null) {
controller.enqueue({
type: 'text-end',
id: currentTextBlockId,
});
currentTextBlockId = null;
}
if (currentReasoningBlockId !== null) {
controller.enqueue({
type: 'reasoning-end',
id: currentReasoningBlockId,
});
currentReasoningBlockId = null;
}
// Process file parts inline to preserve order with text
const thoughtSignatureMetadata = part.thoughtSignature
? {
[providerOptionsName]: {
thoughtSignature: part.thoughtSignature,
},
}
: undefined;
controller.enqueue({

@@ -573,2 +597,3 @@ type: 'file',

data: part.inlineData.data,
providerMetadata: thoughtSignatureMetadata,
});

@@ -575,0 +600,0 @@ }

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