@ai-sdk/anthropic 3.0.92 → 3.0.93
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 +8 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +2 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +2 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/anthropic-messages-language-model.ts +5 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -3498,6 +3498,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3498
3498
|
});
|
|
3499
3499
|
const thinkingType = (_e = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _e.type;
|
|
3500
3500
|
const isThinking = thinkingType === "enabled" || thinkingType === "adaptive";
|
|
3501
|
+
const sendThinking = isThinking || thinkingType === "disabled";
|
|
3501
3502
|
let thinkingBudget = thinkingType === "enabled" ? (_f = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _f.budgetTokens : void 0;
|
|
3502
3503
|
const thinkingDisplay = thinkingType === "adaptive" ? (_g = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _g.display : void 0;
|
|
3503
3504
|
const maxTokens = maxOutputTokens != null ? maxOutputTokens : maxOutputTokensForModel;
|
|
@@ -3511,7 +3512,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3511
3512
|
top_p: topP,
|
|
3512
3513
|
stop_sequences: stopSequences,
|
|
3513
3514
|
// provider specific settings:
|
|
3514
|
-
...
|
|
3515
|
+
...sendThinking && {
|
|
3515
3516
|
thinking: {
|
|
3516
3517
|
type: thinkingType,
|
|
3517
3518
|
...thinkingBudget != null && { budget_tokens: thinkingBudget },
|