@ai-sdk/anthropic 3.0.91 → 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 +15 -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 +3 -3
- package/src/anthropic-messages-language-model.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 3.0.93
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4241b49: fix(anthropic): forward `thinking: { type: 'disabled' }` to the API instead of stripping it
|
|
8
|
+
|
|
9
|
+
Previously, setting `providerOptions.anthropic.thinking = { type: 'disabled' }` was accepted by the schema but silently dropped from the outgoing request. For models that default thinking on (e.g. Sonnet 5), this left thinking enabled and could consume a small `max_tokens` budget entirely. The `disabled` value is now sent to the Anthropic Messages API.
|
|
10
|
+
|
|
11
|
+
## 3.0.92
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [ea1e95b]
|
|
16
|
+
- @ai-sdk/provider-utils@4.0.35
|
|
17
|
+
|
|
3
18
|
## 3.0.91
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var import_provider4 = require("@ai-sdk/provider");
|
|
|
32
32
|
var import_provider_utils26 = require("@ai-sdk/provider-utils");
|
|
33
33
|
|
|
34
34
|
// src/version.ts
|
|
35
|
-
var VERSION = true ? "3.0.
|
|
35
|
+
var VERSION = true ? "3.0.93" : "0.0.0-test";
|
|
36
36
|
|
|
37
37
|
// src/anthropic-messages-language-model.ts
|
|
38
38
|
var import_provider3 = require("@ai-sdk/provider");
|
|
@@ -3465,6 +3465,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3465
3465
|
});
|
|
3466
3466
|
const thinkingType = (_e = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _e.type;
|
|
3467
3467
|
const isThinking = thinkingType === "enabled" || thinkingType === "adaptive";
|
|
3468
|
+
const sendThinking = isThinking || thinkingType === "disabled";
|
|
3468
3469
|
let thinkingBudget = thinkingType === "enabled" ? (_f = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _f.budgetTokens : void 0;
|
|
3469
3470
|
const thinkingDisplay = thinkingType === "adaptive" ? (_g = anthropicOptions == null ? void 0 : anthropicOptions.thinking) == null ? void 0 : _g.display : void 0;
|
|
3470
3471
|
const maxTokens = maxOutputTokens != null ? maxOutputTokens : maxOutputTokensForModel;
|
|
@@ -3478,7 +3479,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3478
3479
|
top_p: topP,
|
|
3479
3480
|
stop_sequences: stopSequences,
|
|
3480
3481
|
// provider specific settings:
|
|
3481
|
-
...
|
|
3482
|
+
...sendThinking && {
|
|
3482
3483
|
thinking: {
|
|
3483
3484
|
type: thinkingType,
|
|
3484
3485
|
...thinkingBudget != null && { budget_tokens: thinkingBudget },
|