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
410
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.46
to
3.0.47
+6
-0
CHANGELOG.md
# @ai-sdk/google
## 3.0.47
### Patch Changes
- 9d46b93: fix(provider/google): correctly mark reasoning files as such and fix related multi-turn errors
## 3.0.46

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

+1
-0

@@ -59,2 +59,3 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

};
thought?: boolean | null | undefined;
thoughtSignature?: string | null | undefined;

@@ -61,0 +62,0 @@ } | {

@@ -59,2 +59,3 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

};
thought?: boolean | null | undefined;
thoughtSignature?: string | null | undefined;

@@ -61,0 +62,0 @@ } | {

@@ -98,2 +98,3 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

};
thought?: boolean | null | undefined;
thoughtSignature?: string | null | undefined;

@@ -100,0 +101,0 @@ } | {

@@ -98,2 +98,3 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';

};
thought?: boolean | null | undefined;
thoughtSignature?: string | null | undefined;

@@ -100,0 +101,0 @@ } | {

+13
-5

@@ -274,2 +274,3 @@ "use strict";

},
...(providerOpts == null ? void 0 : providerOpts.thought) === true ? { thought: true } : {},
thoughtSignature

@@ -939,2 +940,4 @@ };

} else if ("inlineData" in part) {
const hasThought = part.thought === true;
const hasThoughtSignature = !!part.thoughtSignature;
content.push({

@@ -944,5 +947,6 @@ type: "file",

mediaType: part.inlineData.mimeType,
providerMetadata: part.thoughtSignature ? {
providerMetadata: hasThought || hasThoughtSignature ? {
[providerOptionsName]: {
thoughtSignature: part.thoughtSignature
...hasThought ? { thought: true } : {},
...hasThoughtSignature ? { thoughtSignature: part.thoughtSignature } : {}
}

@@ -1168,5 +1172,8 @@ } : void 0

}
const thoughtSignatureMetadata = part.thoughtSignature ? {
const hasThought = part.thought === true;
const hasThoughtSignature = !!part.thoughtSignature;
const fileMeta = hasThought || hasThoughtSignature ? {
[providerOptionsName]: {
thoughtSignature: part.thoughtSignature
...hasThought ? { thought: true } : {},
...hasThoughtSignature ? { thoughtSignature: part.thoughtSignature } : {}
}

@@ -1178,3 +1185,3 @@ } : void 0;

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

@@ -1445,2 +1452,3 @@ }

}),
thought: import_v43.z.boolean().nullish(),
thoughtSignature: import_v43.z.string().nullish()

@@ -1447,0 +1455,0 @@ }),

@@ -257,2 +257,3 @@ // src/google-generative-ai-language-model.ts

},
...(providerOpts == null ? void 0 : providerOpts.thought) === true ? { thought: true } : {},
thoughtSignature

@@ -928,2 +929,4 @@ };

} else if ("inlineData" in part) {
const hasThought = part.thought === true;
const hasThoughtSignature = !!part.thoughtSignature;
content.push({

@@ -933,5 +936,6 @@ type: "file",

mediaType: part.inlineData.mimeType,
providerMetadata: part.thoughtSignature ? {
providerMetadata: hasThought || hasThoughtSignature ? {
[providerOptionsName]: {
thoughtSignature: part.thoughtSignature
...hasThought ? { thought: true } : {},
...hasThoughtSignature ? { thoughtSignature: part.thoughtSignature } : {}
}

@@ -1157,5 +1161,8 @@ } : void 0

}
const thoughtSignatureMetadata = part.thoughtSignature ? {
const hasThought = part.thought === true;
const hasThoughtSignature = !!part.thoughtSignature;
const fileMeta = hasThought || hasThoughtSignature ? {
[providerOptionsName]: {
thoughtSignature: part.thoughtSignature
...hasThought ? { thought: true } : {},
...hasThoughtSignature ? { thoughtSignature: part.thoughtSignature } : {}
}

@@ -1167,3 +1174,3 @@ } : void 0;

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

@@ -1434,2 +1441,3 @@ }

}),
thought: z3.boolean().nullish(),
thoughtSignature: z3.string().nullish()

@@ -1436,0 +1444,0 @@ }),

{
"name": "@ai-sdk/google",
"version": "3.0.46",
"version": "3.0.47",
"license": "Apache-2.0",

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

@@ -128,2 +128,5 @@ import {

},
...(providerOpts?.thought === true
? { thought: true }
: {}),
thoughtSignature,

@@ -130,0 +133,0 @@ };

@@ -307,2 +307,4 @@ import {

} else if ('inlineData' in part) {
const hasThought = part.thought === true;
const hasThoughtSignature = !!part.thoughtSignature;
content.push({

@@ -312,9 +314,13 @@ type: 'file' as const,

mediaType: part.inlineData.mimeType,
providerMetadata: part.thoughtSignature
? {
[providerOptionsName]: {
thoughtSignature: part.thoughtSignature,
},
}
: undefined,
providerMetadata:
hasThought || hasThoughtSignature
? {
[providerOptionsName]: {
...(hasThought ? { thought: true } : {}),
...(hasThoughtSignature
? { thoughtSignature: part.thoughtSignature }
: {}),
},
}
: undefined,
});

@@ -595,10 +601,15 @@ }

// Process file parts inline to preserve order with text
const thoughtSignatureMetadata = part.thoughtSignature
? {
[providerOptionsName]: {
thoughtSignature: part.thoughtSignature,
},
}
: undefined;
const hasThought = part.thought === true;
const hasThoughtSignature = !!part.thoughtSignature;
const fileMeta =
hasThought || hasThoughtSignature
? {
[providerOptionsName]: {
...(hasThought ? { thought: true } : {}),
...(hasThoughtSignature
? { thoughtSignature: part.thoughtSignature }
: {}),
},
}
: undefined;
controller.enqueue({

@@ -608,3 +619,3 @@ type: 'file',

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

@@ -942,2 +953,3 @@ }

}),
thought: z.boolean().nullish(),
thoughtSignature: z.string().nullish(),

@@ -944,0 +956,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