@ai-sdk/amazon-bedrock 3.0.1 → 3.0.3

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
@@ -671,12 +671,6 @@ var BedrockChatLanguageModel = class {
671
671
  setting: "seed"
672
672
  });
673
673
  }
674
- if (topK != null) {
675
- warnings.push({
676
- type: "unsupported-setting",
677
- setting: "topK"
678
- });
679
- }
680
674
  if (responseFormat != null && responseFormat.type !== "text" && responseFormat.type !== "json") {
681
675
  warnings.push({
682
676
  type: "unsupported-setting",
@@ -716,6 +710,7 @@ var BedrockChatLanguageModel = class {
716
710
  ...maxOutputTokens != null && { maxOutputTokens },
717
711
  ...temperature != null && { temperature },
718
712
  ...topP != null && { topP },
713
+ ...topK != null && { topK },
719
714
  ...stopSequences != null && { stopSequences }
720
715
  };
721
716
  if (isThinking && thinkingBudget != null) {
@@ -748,6 +743,14 @@ var BedrockChatLanguageModel = class {
748
743
  details: "topP is not supported when thinking is enabled"
749
744
  });
750
745
  }
746
+ if (isThinking && inferenceConfig.topK != null) {
747
+ delete inferenceConfig.topK;
748
+ warnings.push({
749
+ type: "unsupported-setting",
750
+ setting: "topK",
751
+ details: "topK is not supported when thinking is enabled"
752
+ });
753
+ }
751
754
  const hasAnyTools = ((_f = (_e = toolConfig.tools) == null ? void 0 : _e.length) != null ? _f : 0) > 0 || additionalTools;
752
755
  let filteredPrompt = prompt;
753
756
  if (!hasAnyTools) {