ai 6.0.100 → 6.0.102

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.102
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [45f0a7f]
8
+ - @ai-sdk/gateway@3.0.56
9
+
10
+ ## 6.0.101
11
+
12
+ ### Patch Changes
13
+
14
+ - 5230482: fix(ai): Don't create duplicate tool parts when models call non-existent tools
15
+
3
16
  ## 6.0.100
4
17
 
5
18
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1226,7 +1226,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
1226
1226
  var import_provider_utils4 = require("@ai-sdk/provider-utils");
1227
1227
 
1228
1228
  // src/version.ts
1229
- var VERSION = true ? "6.0.100" : "0.0.0-test";
1229
+ var VERSION = true ? "6.0.102" : "0.0.0-test";
1230
1230
 
1231
1231
  // src/util/download/download.ts
1232
1232
  var download = async ({
@@ -5562,7 +5562,9 @@ function processUIMessageStream({
5562
5562
  break;
5563
5563
  }
5564
5564
  case "tool-input-error": {
5565
- if (chunk.dynamic) {
5565
+ const existingPart = state.message.parts.filter(isToolUIPart).find((p) => p.toolCallId === chunk.toolCallId);
5566
+ const isDynamic = existingPart != null ? existingPart.type === "dynamic-tool" : !!chunk.dynamic;
5567
+ if (isDynamic) {
5566
5568
  updateDynamicToolPart({
5567
5569
  toolCallId: chunk.toolCallId,
5568
5570
  toolName: chunk.toolName,