@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 +14 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
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.
|
|
721
|
-
inferenceConfig.
|
|
720
|
+
if (inferenceConfig.maxTokens != null) {
|
|
721
|
+
inferenceConfig.maxTokens += thinkingBudget;
|
|
722
722
|
} else {
|
|
723
|
-
inferenceConfig.
|
|
723
|
+
inferenceConfig.maxTokens = thinkingBudget + 4096;
|
|
724
724
|
}
|
|
725
725
|
bedrockOptions.additionalModelRequestFields = {
|
|
726
726
|
...bedrockOptions.additionalModelRequestFields,
|