@ai-sdk/amazon-bedrock 3.0.4 → 3.0.5
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 +6 -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 +1 -1
package/CHANGELOG.md
CHANGED
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.
|
|
725
|
-
inferenceConfig.
|
|
724
|
+
if (inferenceConfig.maxTokens != null) {
|
|
725
|
+
inferenceConfig.maxTokens += thinkingBudget;
|
|
726
726
|
} else {
|
|
727
|
-
inferenceConfig.
|
|
727
|
+
inferenceConfig.maxTokens = thinkingBudget + 4096;
|
|
728
728
|
}
|
|
729
729
|
bedrockOptions.additionalModelRequestFields = {
|
|
730
730
|
...bedrockOptions.additionalModelRequestFields,
|