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/CHANGELOG.md +8 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -12
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +1 -1
- package/package.json +2 -2
- package/src/generate-text/generate-text.ts +4 -1
- package/src/generate-text/run-tools-transformation.ts +14 -12
- package/src/generate-text/stream-text-result.ts +3 -2
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.
|
|
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
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
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];
|