ai 6.0.236 → 6.0.237

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/dist/index.mjs CHANGED
@@ -1193,7 +1193,7 @@ import {
1193
1193
  } from "@ai-sdk/provider-utils";
1194
1194
 
1195
1195
  // src/version.ts
1196
- var VERSION = true ? "6.0.236" : "0.0.0-test";
1196
+ var VERSION = true ? "6.0.237" : "0.0.0-test";
1197
1197
 
1198
1198
  // src/util/download/download.ts
1199
1199
  var download = async ({
@@ -4860,7 +4860,7 @@ async function generateText({
4860
4860
  }
4861
4861
  }
4862
4862
  const invalidToolCalls = stepToolCalls.filter(
4863
- (toolCall) => toolCall.invalid && toolCall.dynamic
4863
+ (toolCall) => toolCall.invalid && toolCall.dynamic && !toolCall.providerExecuted
4864
4864
  );
4865
4865
  clientToolOutputs = [];
4866
4866
  for (const toolCall of invalidToolCalls) {
@@ -6746,16 +6746,18 @@ function runToolsTransformation({
6746
6746
  toolCallsByToolCallId.set(toolCall.toolCallId, toolCall);
6747
6747
  controller.enqueue(toolCall);
6748
6748
  if (toolCall.invalid) {
6749
- enqueueToolResult({
6750
- type: "tool-error",
6751
- toolCallId: toolCall.toolCallId,
6752
- toolName: toolCall.toolName,
6753
- input: toolCall.input,
6754
- error: getErrorMessage5(toolCall.error),
6755
- dynamic: true,
6756
- title: toolCall.title,
6757
- ...toolCall.toolMetadata != null ? { toolMetadata: toolCall.toolMetadata } : {}
6758
- });
6749
+ if (!toolCall.providerExecuted) {
6750
+ enqueueToolResult({
6751
+ type: "tool-error",
6752
+ toolCallId: toolCall.toolCallId,
6753
+ toolName: toolCall.toolName,
6754
+ input: toolCall.input,
6755
+ error: getErrorMessage5(toolCall.error),
6756
+ dynamic: true,
6757
+ title: toolCall.title,
6758
+ ...toolCall.toolMetadata != null ? { toolMetadata: toolCall.toolMetadata } : {}
6759
+ });
6760
+ }
6759
6761
  break;
6760
6762
  }
6761
6763
  const tool2 = tools == null ? void 0 : tools[toolCall.toolName];