@ai-sdk/amazon-bedrock 3.1.0-beta.12 → 3.1.0-beta.14

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,22 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 3.1.0-beta.14
4
+
5
+ ### Patch Changes
6
+
7
+ - 11eefa4: Support user provided filenames in amazon-bedrock-provider
8
+
9
+ ## 3.1.0-beta.13
10
+
11
+ ### Patch Changes
12
+
13
+ - e8109d3: feat: tool execution approval
14
+ - Updated dependencies [046aa3b]
15
+ - Updated dependencies [e8109d3]
16
+ - @ai-sdk/provider@2.1.0-beta.5
17
+ - @ai-sdk/provider-utils@3.1.0-beta.7
18
+ - @ai-sdk/anthropic@2.1.0-beta.11
19
+
3
20
  ## 3.1.0-beta.12
4
21
 
5
22
  ### 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.1.0-beta.12" : "0.0.0-test";
33
+ var VERSION = true ? "3.1.0-beta.14" : "0.0.0-test";
34
34
 
35
35
  // src/bedrock-provider.ts
36
36
  var import_internal2 = require("@ai-sdk/anthropic/internal");
@@ -333,6 +333,7 @@ async function shouldEnableCitations(providerMetadata) {
333
333
  return (_b = (_a = bedrockOptions == null ? void 0 : bedrockOptions.citations) == null ? void 0 : _a.enabled) != null ? _b : false;
334
334
  }
335
335
  async function convertToBedrockChatMessages(prompt) {
336
+ var _a, _b;
336
337
  const blocks = groupIntoBlocks(prompt);
337
338
  let system = [];
338
339
  const messages = [];
@@ -398,7 +399,7 @@ async function convertToBedrockChatMessages(prompt) {
398
399
  bedrockContent.push({
399
400
  document: {
400
401
  format: getBedrockDocumentFormat(part.mediaType),
401
- name: generateDocumentName(),
402
+ name: (_a = part.filename) != null ? _a : generateDocumentName(),
402
403
  source: { bytes: (0, import_provider_utils3.convertToBase64)(part.data) },
403
404
  ...enableCitations && {
404
405
  citations: { enabled: true }
@@ -445,6 +446,11 @@ async function convertToBedrockChatMessages(prompt) {
445
446
  case "error-text":
446
447
  toolResultContent = [{ text: output.value }];
447
448
  break;
449
+ case "execution-denied":
450
+ toolResultContent = [
451
+ { text: (_b = output.reason) != null ? _b : "Tool execution denied." }
452
+ ];
453
+ break;
448
454
  case "json":
449
455
  case "error-json":
450
456
  default: