@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/dist/index.mjs CHANGED
@@ -710,17 +710,17 @@ var BedrockChatLanguageModel = class {
710
710
  const isThinking = ((_b = bedrockOptions.reasoningConfig) == null ? void 0 : _b.type) === "enabled";
711
711
  const thinkingBudget = (_c = bedrockOptions.reasoningConfig) == null ? void 0 : _c.budgetTokens;
712
712
  const inferenceConfig = {
713
- ...maxOutputTokens != null && { maxOutputTokens },
713
+ ...maxOutputTokens != null && { maxTokens: maxOutputTokens },
714
714
  ...temperature != null && { temperature },
715
715
  ...topP != null && { topP },
716
716
  ...topK != null && { topK },
717
717
  ...stopSequences != null && { stopSequences }
718
718
  };
719
719
  if (isThinking && thinkingBudget != null) {
720
- if (inferenceConfig.maxOutputTokens != null) {
721
- inferenceConfig.maxOutputTokens += thinkingBudget;
720
+ if (inferenceConfig.maxTokens != null) {
721
+ inferenceConfig.maxTokens += thinkingBudget;
722
722
  } else {
723
- inferenceConfig.maxOutputTokens = thinkingBudget + 4096;
723
+ inferenceConfig.maxTokens = thinkingBudget + 4096;
724
724
  }
725
725
  bedrockOptions.additionalModelRequestFields = {
726
726
  ...bedrockOptions.additionalModelRequestFields,