@ai-sdk/amazon-bedrock 3.1.0-beta.13 → 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/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  } from "@ai-sdk/provider-utils";
9
9
 
10
10
  // src/version.ts
11
- var VERSION = true ? "3.1.0-beta.13" : "0.0.0-test";
11
+ var VERSION = true ? "3.1.0-beta.14" : "0.0.0-test";
12
12
 
13
13
  // src/bedrock-provider.ts
14
14
  import { anthropicTools as anthropicTools2 } from "@ai-sdk/anthropic/internal";
@@ -329,7 +329,7 @@ async function shouldEnableCitations(providerMetadata) {
329
329
  return (_b = (_a = bedrockOptions == null ? void 0 : bedrockOptions.citations) == null ? void 0 : _a.enabled) != null ? _b : false;
330
330
  }
331
331
  async function convertToBedrockChatMessages(prompt) {
332
- var _a;
332
+ var _a, _b;
333
333
  const blocks = groupIntoBlocks(prompt);
334
334
  let system = [];
335
335
  const messages = [];
@@ -395,7 +395,7 @@ async function convertToBedrockChatMessages(prompt) {
395
395
  bedrockContent.push({
396
396
  document: {
397
397
  format: getBedrockDocumentFormat(part.mediaType),
398
- name: generateDocumentName(),
398
+ name: (_a = part.filename) != null ? _a : generateDocumentName(),
399
399
  source: { bytes: convertToBase64(part.data) },
400
400
  ...enableCitations && {
401
401
  citations: { enabled: true }
@@ -444,7 +444,7 @@ async function convertToBedrockChatMessages(prompt) {
444
444
  break;
445
445
  case "execution-denied":
446
446
  toolResultContent = [
447
- { text: (_a = output.reason) != null ? _a : "Tool execution denied." }
447
+ { text: (_b = output.reason) != null ? _b : "Tool execution denied." }
448
448
  ];
449
449
  break;
450
450
  case "json":