@ai-sdk/google 3.0.37 → 3.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 3.0.38
4
+
5
+ ### Patch Changes
6
+
7
+ - 2291047: fix(ai): fix missing support for image thought signatures (e.g. for Gemini image models)
8
+
3
9
  ## 3.0.37
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(src_exports);
30
30
  var import_provider_utils16 = require("@ai-sdk/provider-utils");
31
31
 
32
32
  // src/version.ts
33
- var VERSION = true ? "3.0.37" : "0.0.0-test";
33
+ var VERSION = true ? "3.0.38" : "0.0.0-test";
34
34
 
35
35
  // src/google-generative-ai-embedding-model.ts
36
36
  var import_provider = require("@ai-sdk/provider");
@@ -1291,10 +1291,30 @@ var GoogleGenerativeAILanguageModel = class {
1291
1291
  });
1292
1292
  }
1293
1293
  } else if ("inlineData" in part) {
1294
+ if (currentTextBlockId !== null) {
1295
+ controller.enqueue({
1296
+ type: "text-end",
1297
+ id: currentTextBlockId
1298
+ });
1299
+ currentTextBlockId = null;
1300
+ }
1301
+ if (currentReasoningBlockId !== null) {
1302
+ controller.enqueue({
1303
+ type: "reasoning-end",
1304
+ id: currentReasoningBlockId
1305
+ });
1306
+ currentReasoningBlockId = null;
1307
+ }
1308
+ const thoughtSignatureMetadata = part.thoughtSignature ? {
1309
+ [providerOptionsName]: {
1310
+ thoughtSignature: part.thoughtSignature
1311
+ }
1312
+ } : void 0;
1294
1313
  controller.enqueue({
1295
1314
  type: "file",
1296
1315
  mediaType: part.inlineData.mimeType,
1297
- data: part.inlineData.data
1316
+ data: part.inlineData.data,
1317
+ providerMetadata: thoughtSignatureMetadata
1298
1318
  });
1299
1319
  }
1300
1320
  }