@ai-sdk/amazon-bedrock 4.0.0-beta.58 → 4.0.0-beta.59

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
+ ## 4.0.0-beta.59
4
+
5
+ ### Patch Changes
6
+
7
+ - 2a2e17d: fix (provider/amazon-bedrock): deal gracefully with empty tool descriptions
8
+
3
9
  ## 4.0.0-beta.58
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -182,6 +182,7 @@ async function prepareTools({
182
182
  toolChoice,
183
183
  modelId
184
184
  }) {
185
+ var _a;
185
186
  const toolWarnings = [];
186
187
  const betas = /* @__PURE__ */ new Set();
187
188
  if (tools == null || tools.length === 0) {
@@ -270,7 +271,7 @@ async function prepareTools({
270
271
  bedrockTools.push({
271
272
  toolSpec: {
272
273
  name: tool.name,
273
- description: tool.description,
274
+ ...((_a = tool.description) == null ? void 0 : _a.trim()) !== "" ? { description: tool.description } : {},
274
275
  inputSchema: {
275
276
  json: tool.inputSchema
276
277
  }
@@ -1510,7 +1511,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1510
1511
  var import_aws4fetch = require("aws4fetch");
1511
1512
 
1512
1513
  // src/version.ts
1513
- var VERSION = true ? "4.0.0-beta.58" : "0.0.0-test";
1514
+ var VERSION = true ? "4.0.0-beta.59" : "0.0.0-test";
1514
1515
 
1515
1516
  // src/bedrock-sigv4-fetch.ts
1516
1517
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {