@ai-sdk/amazon-bedrock 3.0.4 → 3.0.6

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,19 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 3.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [38ac190]
8
+ - @ai-sdk/provider-utils@3.0.2
9
+ - @ai-sdk/anthropic@2.0.2
10
+
11
+ ## 3.0.5
12
+
13
+ ### Patch Changes
14
+
15
+ - c2871e6: fix(provider/amazon-bedrock): resolve opus 4.1 reasoning mode validation error
16
+
3
17
  ## 3.0.4
4
18
 
5
19
  ### Patch Changes
package/dist/index.js CHANGED
@@ -714,17 +714,17 @@ var BedrockChatLanguageModel = class {
714
714
  const isThinking = ((_b = bedrockOptions.reasoningConfig) == null ? void 0 : _b.type) === "enabled";
715
715
  const thinkingBudget = (_c = bedrockOptions.reasoningConfig) == null ? void 0 : _c.budgetTokens;
716
716
  const inferenceConfig = {
717
- ...maxOutputTokens != null && { maxOutputTokens },
717
+ ...maxOutputTokens != null && { maxTokens: maxOutputTokens },
718
718
  ...temperature != null && { temperature },
719
719
  ...topP != null && { topP },
720
720
  ...topK != null && { topK },
721
721
  ...stopSequences != null && { stopSequences }
722
722
  };
723
723
  if (isThinking && thinkingBudget != null) {
724
- if (inferenceConfig.maxOutputTokens != null) {
725
- inferenceConfig.maxOutputTokens += thinkingBudget;
724
+ if (inferenceConfig.maxTokens != null) {
725
+ inferenceConfig.maxTokens += thinkingBudget;
726
726
  } else {
727
- inferenceConfig.maxOutputTokens = thinkingBudget + 4096;
727
+ inferenceConfig.maxTokens = thinkingBudget + 4096;
728
728
  }
729
729
  bedrockOptions.additionalModelRequestFields = {
730
730
  ...bedrockOptions.additionalModelRequestFields,