@ai-sdk/amazon-bedrock 4.0.0-beta.70 → 4.0.0-beta.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,24 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 4.0.0-beta.72
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [03849b0]
8
+ - Updated dependencies [03849b0]
9
+ - @ai-sdk/provider-utils@4.0.0-beta.38
10
+ - @ai-sdk/anthropic@3.0.0-beta.64
11
+
12
+ ## 4.0.0-beta.71
13
+
14
+ ### Patch Changes
15
+
16
+ - 457318b: chore(provider,ai): switch to SharedV3Warning and unified warnings
17
+ - Updated dependencies [457318b]
18
+ - @ai-sdk/anthropic@3.0.0-beta.63
19
+ - @ai-sdk/provider@3.0.0-beta.20
20
+ - @ai-sdk/provider-utils@4.0.0-beta.37
21
+
3
22
  ## 4.0.0-beta.70
4
23
 
5
24
  ### Patch Changes
package/dist/index.js CHANGED
@@ -200,8 +200,8 @@ async function prepareTools({
200
200
  const supportedTools = tools.filter((tool) => {
201
201
  if (tool.type === "provider-defined" && tool.id === "anthropic.web_search_20250305") {
202
202
  toolWarnings.push({
203
- type: "unsupported-tool",
204
- tool,
203
+ type: "unsupported",
204
+ feature: "web_search_20250305 tool",
205
205
  details: "The web_search_20250305 tool is not supported on Amazon Bedrock."
206
206
  });
207
207
  return false;
@@ -227,8 +227,8 @@ async function prepareTools({
227
227
  if (usingAnthropicTools) {
228
228
  if (functionTools.length > 0) {
229
229
  toolWarnings.push({
230
- type: "unsupported-setting",
231
- setting: "tools",
230
+ type: "unsupported",
231
+ feature: "mixing Anthropic provider-defined tools and standard function tools",
232
232
  details: "Mixed Anthropic provider-defined tools and standard function tools are not supported in a single call to Bedrock. Only Anthropic tools will be used."
233
233
  });
234
234
  }
@@ -263,12 +263,12 @@ async function prepareTools({
263
263
  }
264
264
  });
265
265
  } else {
266
- toolWarnings.push({ type: "unsupported-tool", tool });
266
+ toolWarnings.push({ type: "unsupported", feature: "tool ${tool.id}" });
267
267
  }
268
268
  }
269
269
  } else {
270
270
  for (const tool of providerDefinedTools) {
271
- toolWarnings.push({ type: "unsupported-tool", tool });
271
+ toolWarnings.push({ type: "unsupported", feature: `tool ${tool.id}` });
272
272
  }
273
273
  }
274
274
  for (const tool of functionTools) {
@@ -706,41 +706,41 @@ var BedrockChatLanguageModel = class {
706
706
  const warnings = [];
707
707
  if (frequencyPenalty != null) {
708
708
  warnings.push({
709
- type: "unsupported-setting",
710
- setting: "frequencyPenalty"
709
+ type: "unsupported",
710
+ feature: "frequencyPenalty"
711
711
  });
712
712
  }
713
713
  if (presencePenalty != null) {
714
714
  warnings.push({
715
- type: "unsupported-setting",
716
- setting: "presencePenalty"
715
+ type: "unsupported",
716
+ feature: "presencePenalty"
717
717
  });
718
718
  }
719
719
  if (seed != null) {
720
720
  warnings.push({
721
- type: "unsupported-setting",
722
- setting: "seed"
721
+ type: "unsupported",
722
+ feature: "seed"
723
723
  });
724
724
  }
725
725
  if (temperature != null && temperature > 1) {
726
726
  warnings.push({
727
- type: "unsupported-setting",
728
- setting: "temperature",
727
+ type: "unsupported",
728
+ feature: "temperature",
729
729
  details: `${temperature} exceeds bedrock maximum of 1.0. clamped to 1.0`
730
730
  });
731
731
  temperature = 1;
732
732
  } else if (temperature != null && temperature < 0) {
733
733
  warnings.push({
734
- type: "unsupported-setting",
735
- setting: "temperature",
734
+ type: "unsupported",
735
+ feature: "temperature",
736
736
  details: `${temperature} is below bedrock minimum of 0. clamped to 0`
737
737
  });
738
738
  temperature = 0;
739
739
  }
740
740
  if (responseFormat != null && responseFormat.type !== "text" && responseFormat.type !== "json") {
741
741
  warnings.push({
742
- type: "unsupported-setting",
743
- setting: "responseFormat",
742
+ type: "unsupported",
743
+ feature: "responseFormat",
744
744
  details: "Only text and json response formats are supported."
745
745
  });
746
746
  }
@@ -796,24 +796,24 @@ var BedrockChatLanguageModel = class {
796
796
  if (isThinking && inferenceConfig.temperature != null) {
797
797
  delete inferenceConfig.temperature;
798
798
  warnings.push({
799
- type: "unsupported-setting",
800
- setting: "temperature",
799
+ type: "unsupported",
800
+ feature: "temperature",
801
801
  details: "temperature is not supported when thinking is enabled"
802
802
  });
803
803
  }
804
804
  if (isThinking && inferenceConfig.topP != null) {
805
805
  delete inferenceConfig.topP;
806
806
  warnings.push({
807
- type: "unsupported-setting",
808
- setting: "topP",
807
+ type: "unsupported",
808
+ feature: "topP",
809
809
  details: "topP is not supported when thinking is enabled"
810
810
  });
811
811
  }
812
812
  if (isThinking && inferenceConfig.topK != null) {
813
813
  delete inferenceConfig.topK;
814
814
  warnings.push({
815
- type: "unsupported-setting",
816
- setting: "topK",
815
+ type: "unsupported",
816
+ feature: "topK",
817
817
  details: "topK is not supported when thinking is enabled"
818
818
  });
819
819
  }
@@ -837,8 +837,8 @@ var BedrockChatLanguageModel = class {
837
837
  (message) => message.role === "system" || message.content.length > 0
838
838
  );
839
839
  warnings.push({
840
- type: "unsupported-setting",
841
- setting: "toolContent",
840
+ type: "unsupported",
841
+ feature: "toolContent",
842
842
  details: "Tool calls and results removed from conversation because Bedrock does not support tool content without active tools."
843
843
  });
844
844
  }
@@ -1494,8 +1494,8 @@ var BedrockImageModel = class {
1494
1494
  };
1495
1495
  if (aspectRatio != void 0) {
1496
1496
  warnings.push({
1497
- type: "unsupported-setting",
1498
- setting: "aspectRatio",
1497
+ type: "unsupported",
1498
+ feature: "aspectRatio",
1499
1499
  details: "This model does not support aspect ratio. Use `size` instead."
1500
1500
  });
1501
1501
  }
@@ -1536,7 +1536,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1536
1536
  var import_aws4fetch = require("aws4fetch");
1537
1537
 
1538
1538
  // src/version.ts
1539
- var VERSION = true ? "4.0.0-beta.70" : "0.0.0-test";
1539
+ var VERSION = true ? "4.0.0-beta.72" : "0.0.0-test";
1540
1540
 
1541
1541
  // src/bedrock-sigv4-fetch.ts
1542
1542
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {