ai 6.0.56 → 6.0.58

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,18 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.58
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [a8be296]
8
+ - @ai-sdk/gateway@3.0.26
9
+
10
+ ## 6.0.57
11
+
12
+ ### Patch Changes
13
+
14
+ - 65865d8: Fix handling of error results in deferrable tools
15
+
3
16
  ## 6.0.56
4
17
 
5
18
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1104,7 +1104,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
1104
1104
  var import_provider_utils4 = require("@ai-sdk/provider-utils");
1105
1105
 
1106
1106
  // src/version.ts
1107
- var VERSION = true ? "6.0.56" : "0.0.0-test";
1107
+ var VERSION = true ? "6.0.58" : "0.0.0-test";
1108
1108
 
1109
1109
  // src/util/download/download.ts
1110
1110
  var download = async ({ url }) => {
@@ -6952,7 +6952,7 @@ var DefaultStreamTextResult = class {
6952
6952
  const tool2 = tools == null ? void 0 : tools[toolCall.toolName];
6953
6953
  if ((tool2 == null ? void 0 : tool2.type) === "provider" && tool2.supportsDeferredResults) {
6954
6954
  const hasResultInStep = stepToolOutputs.some(
6955
- (output2) => output2.type === "tool-result" && output2.toolCallId === toolCall.toolCallId
6955
+ (output2) => (output2.type === "tool-result" || output2.type === "tool-error") && output2.toolCallId === toolCall.toolCallId
6956
6956
  );
6957
6957
  if (!hasResultInStep) {
6958
6958
  pendingDeferredToolCalls.set(toolCall.toolCallId, {
@@ -6962,7 +6962,7 @@ var DefaultStreamTextResult = class {
6962
6962
  }
6963
6963
  }
6964
6964
  for (const output2 of stepToolOutputs) {
6965
- if (output2.type === "tool-result") {
6965
+ if (output2.type === "tool-result" || output2.type === "tool-error") {
6966
6966
  pendingDeferredToolCalls.delete(output2.toolCallId);
6967
6967
  }
6968
6968
  }