@ai-sdk/anthropic 4.0.25 → 4.0.26
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 +5 -2
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +4 -1
- package/dist/internal/index.js.map +1 -1
- package/docs/05-anthropic.mdx +5 -0
- package/package.json +2 -2
- package/src/anthropic-language-model.ts +4 -1
package/docs/05-anthropic.mdx
CHANGED
|
@@ -448,6 +448,11 @@ console.log(reasoning); // reasoning details including redacted reasoning
|
|
|
448
448
|
console.log(text); // text response
|
|
449
449
|
```
|
|
450
450
|
|
|
451
|
+
Anthropic's `max_tokens` limit includes both thinking and final text. To reserve
|
|
452
|
+
room for both, the provider adds `budgetTokens` to `maxOutputTokens` when
|
|
453
|
+
setting `max_tokens`. For known models, the combined value is capped at the
|
|
454
|
+
model's maximum output token limit.
|
|
455
|
+
|
|
451
456
|
See [AI SDK UI: Chatbot](/docs/ai-sdk-ui/chatbot#reasoning) for more details
|
|
452
457
|
on how to integrate reasoning into your chatbot.
|
|
453
458
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/anthropic",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ai-sdk/provider": "4.0.4",
|
|
39
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
39
|
+
"@ai-sdk/provider-utils": "5.0.17"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "22.19.19",
|
|
@@ -2872,7 +2872,10 @@ function resolveAnthropicReasoningConfig({
|
|
|
2872
2872
|
},
|
|
2873
2873
|
warnings,
|
|
2874
2874
|
});
|
|
2875
|
-
return {
|
|
2875
|
+
return {
|
|
2876
|
+
thinking: { type: 'adaptive', display: 'summarized' },
|
|
2877
|
+
effort,
|
|
2878
|
+
};
|
|
2876
2879
|
}
|
|
2877
2880
|
|
|
2878
2881
|
const budgetTokens = mapReasoningToProviderBudget({
|