@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.js
CHANGED
|
@@ -3457,6 +3457,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3457
3457
|
});
|
|
3458
3458
|
const thinkingType = (_e = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _e.type;
|
|
3459
3459
|
const isThinking = thinkingType === "enabled" || thinkingType === "adaptive";
|
|
3460
|
+
const sendThinking = isThinking || thinkingType === "disabled";
|
|
3460
3461
|
let thinkingBudget = thinkingType === "enabled" ? (_f = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _f.budgetTokens : void 0;
|
|
3461
3462
|
const thinkingDisplay = thinkingType === "adaptive" ? (_g = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _g.display : void 0;
|
|
3462
3463
|
const maxTokens = maxOutputTokens != null ? maxOutputTokens : maxOutputTokensForModel;
|
|
@@ -3470,7 +3471,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3470
3471
|
top_p: topP,
|
|
3471
3472
|
stop_sequences: stopSequences,
|
|
3472
3473
|
// provider specific settings:
|
|
3473
|
-
...
|
|
3474
|
+
...sendThinking && {
|
|
3474
3475
|
thinking: {
|
|
3475
3476
|
type: thinkingType,
|
|
3476
3477
|
...thinkingBudget != null && { budget_tokens: thinkingBudget },
|