@ai-sdk/amazon-bedrock 3.0.66 → 3.0.67

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/amazon-bedrock
2
2
 
3
+ ## 3.0.67
4
+
5
+ ### Patch Changes
6
+
7
+ - 1887f82: fix(bedrock): send {} as tool input when streaming tool calls without arguments
8
+
3
9
  ## 3.0.66
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_utils8 = require("@ai-sdk/provider-utils");
31
31
 
32
32
  // src/version.ts
33
- var VERSION = true ? "3.0.66" : "0.0.0-test";
33
+ var VERSION = true ? "3.0.67" : "0.0.0-test";
34
34
 
35
35
  // src/bedrock-provider.ts
36
36
  var import_internal2 = require("@ai-sdk/anthropic/internal");
@@ -962,7 +962,7 @@ var BedrockChatLanguageModel = class {
962
962
  type: "tool-call",
963
963
  toolCallId: (_c = (_b = part.toolUse) == null ? void 0 : _b.toolUseId) != null ? _c : this.config.generateId(),
964
964
  toolName: (_e = (_d = part.toolUse) == null ? void 0 : _d.name) != null ? _e : `tool-${this.config.generateId()}`,
965
- input: JSON.stringify((_g = (_f = part.toolUse) == null ? void 0 : _f.input) != null ? _g : "")
965
+ input: JSON.stringify((_g = (_f = part.toolUse) == null ? void 0 : _f.input) != null ? _g : {})
966
966
  });
967
967
  }
968
968
  }
@@ -1152,7 +1152,7 @@ var BedrockChatLanguageModel = class {
1152
1152
  type: "tool-call",
1153
1153
  toolCallId: contentBlock.toolCallId,
1154
1154
  toolName: contentBlock.toolName,
1155
- input: contentBlock.jsonText
1155
+ input: contentBlock.jsonText === "" ? "{}" : contentBlock.jsonText
1156
1156
  });
1157
1157
  }
1158
1158
  }