@ai-sdk/google 3.0.0-beta.50 → 3.0.0-beta.51

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.0-beta.51
4
+
5
+ ### Patch Changes
6
+
7
+ - 8370068: fix(provider/google): preserve thoughtSignature through tool execution
8
+
3
9
  ## 3.0.0-beta.50
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_utils13 = require("@ai-sdk/provider-utils");
31
31
 
32
32
  // src/version.ts
33
- var VERSION = true ? "3.0.0-beta.50" : "0.0.0-test";
33
+ var VERSION = true ? "3.0.0-beta.51" : "0.0.0-test";
34
34
 
35
35
  // src/google-generative-ai-embedding-model.ts
36
36
  var import_provider = require("@ai-sdk/provider");
@@ -355,19 +355,20 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
355
355
  contents.push({
356
356
  role: "model",
357
357
  parts: content.map((part) => {
358
- var _a2, _b2, _c, _d, _e, _f;
358
+ var _a2, _b2, _c;
359
+ const thoughtSignature = ((_b2 = (_a2 = part.providerOptions) == null ? void 0 : _a2.google) == null ? void 0 : _b2.thoughtSignature) != null ? String((_c = part.providerOptions.google) == null ? void 0 : _c.thoughtSignature) : void 0;
359
360
  switch (part.type) {
360
361
  case "text": {
361
362
  return part.text.length === 0 ? void 0 : {
362
363
  text: part.text,
363
- thoughtSignature: (_b2 = (_a2 = part.providerOptions) == null ? void 0 : _a2.google) == null ? void 0 : _b2.thoughtSignature
364
+ thoughtSignature
364
365
  };
365
366
  }
366
367
  case "reasoning": {
367
368
  return part.text.length === 0 ? void 0 : {
368
369
  text: part.text,
369
370
  thought: true,
370
- thoughtSignature: (_d = (_c = part.providerOptions) == null ? void 0 : _c.google) == null ? void 0 : _d.thoughtSignature
371
+ thoughtSignature
371
372
  };
372
373
  }
373
374
  case "file": {
@@ -394,7 +395,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
394
395
  name: part.toolName,
395
396
  args: part.input
396
397
  },
397
- thoughtSignature: (_f = (_e = part.providerOptions) == null ? void 0 : _e.google) == null ? void 0 : _f.thoughtSignature
398
+ thoughtSignature
398
399
  };
399
400
  }
400
401
  }