@ai-sdk/amazon-bedrock 3.0.29 → 3.0.31

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.0.29" : "0.0.0-test";
11
+ var VERSION = true ? "3.0.31" : "0.0.0-test";
12
12
 
13
13
  // src/bedrock-provider.ts
14
14
  import { anthropicTools as anthropicTools2 } from "@ai-sdk/anthropic/internal";
@@ -329,6 +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
333
  const blocks = groupIntoBlocks(prompt);
333
334
  let system = [];
334
335
  const messages = [];
@@ -394,7 +395,7 @@ async function convertToBedrockChatMessages(prompt) {
394
395
  bedrockContent.push({
395
396
  document: {
396
397
  format: getBedrockDocumentFormat(part.mediaType),
397
- name: generateDocumentName(),
398
+ name: (_a = part.filename) != null ? _a : generateDocumentName(),
398
399
  source: { bytes: convertToBase64(part.data) },
399
400
  ...enableCitations && {
400
401
  citations: { enabled: true }