@ai-sdk/amazon-bedrock 4.0.70 → 4.0.72

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,21 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 4.0.72
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [89caf28]
8
+ - @ai-sdk/anthropic@3.0.53
9
+
10
+ ## 4.0.71
11
+
12
+ ### Patch Changes
13
+
14
+ - 08336f1: fix(bedrock): strip file extensions from filename
15
+ - Updated dependencies [08336f1]
16
+ - @ai-sdk/provider-utils@4.0.17
17
+ - @ai-sdk/anthropic@3.0.52
18
+
3
19
  ## 4.0.70
4
20
 
5
21
  ### Patch Changes
@@ -35,7 +35,7 @@ var import_provider_utils = require("@ai-sdk/provider-utils");
35
35
  var import_aws4fetch = require("aws4fetch");
36
36
 
37
37
  // src/version.ts
38
- var VERSION = true ? "4.0.70" : "0.0.0-test";
38
+ var VERSION = true ? "4.0.72" : "0.0.0-test";
39
39
 
40
40
  // src/bedrock-sigv4-fetch.ts
41
41
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
@@ -24,7 +24,7 @@ import {
24
24
  import { AwsV4Signer } from "aws4fetch";
25
25
 
26
26
  // src/version.ts
27
- var VERSION = true ? "4.0.70" : "0.0.0-test";
27
+ var VERSION = true ? "4.0.72" : "0.0.0-test";
28
28
 
29
29
  // src/bedrock-sigv4-fetch.ts
30
30
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
package/dist/index.js CHANGED
@@ -400,7 +400,7 @@ async function shouldEnableCitations(providerMetadata) {
400
400
  return (_b = (_a = bedrockOptions == null ? void 0 : bedrockOptions.citations) == null ? void 0 : _a.enabled) != null ? _b : false;
401
401
  }
402
402
  async function convertToBedrockChatMessages(prompt, isMistral = false) {
403
- var _a, _b;
403
+ var _a;
404
404
  const blocks = groupIntoBlocks(prompt);
405
405
  let system = [];
406
406
  const messages = [];
@@ -467,7 +467,7 @@ async function convertToBedrockChatMessages(prompt, isMistral = false) {
467
467
  bedrockContent.push({
468
468
  document: {
469
469
  format: getBedrockDocumentFormat(part.mediaType),
470
- name: (_a = part.filename) != null ? _a : generateDocumentName(),
470
+ name: part.filename ? (0, import_provider_utils3.stripFileExtension)(part.filename) : generateDocumentName(),
471
471
  source: { bytes: (0, import_provider_utils3.convertToBase64)(part.data) },
472
472
  ...enableCitations && {
473
473
  citations: { enabled: true }
@@ -524,7 +524,7 @@ async function convertToBedrockChatMessages(prompt, isMistral = false) {
524
524
  break;
525
525
  case "execution-denied":
526
526
  toolResultContent = [
527
- { text: (_b = output.reason) != null ? _b : "Tool execution denied." }
527
+ { text: (_a = output.reason) != null ? _a : "Tool execution denied." }
528
528
  ];
529
529
  break;
530
530
  case "json":
@@ -1948,7 +1948,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1948
1948
  var import_aws4fetch = require("aws4fetch");
1949
1949
 
1950
1950
  // src/version.ts
1951
- var VERSION = true ? "4.0.70" : "0.0.0-test";
1951
+ var VERSION = true ? "4.0.72" : "0.0.0-test";
1952
1952
 
1953
1953
  // src/bedrock-sigv4-fetch.ts
1954
1954
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {