@ai-sdk/anthropic 4.0.102 → 4.0.103
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 +9 -0
- package/dist/index.js +1 -1
- package/docs/05-anthropic.mdx +10 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -7683,7 +7683,7 @@ var AnthropicSkills = class {
|
|
|
7683
7683
|
};
|
|
7684
7684
|
//#endregion
|
|
7685
7685
|
//#region src/version.ts
|
|
7686
|
-
const VERSION = "4.0.
|
|
7686
|
+
const VERSION = "4.0.103";
|
|
7687
7687
|
//#endregion
|
|
7688
7688
|
//#region src/anthropic-provider.ts
|
|
7689
7689
|
const ANTHROPIC_API_URL = "https://api.anthropic.com";
|
package/docs/05-anthropic.mdx
CHANGED
|
@@ -1044,6 +1044,16 @@ the changed content, and the next step fails. Editing or removing earlier
|
|
|
1044
1044
|
messages between turns, or changing the system prompt or tools between turns,
|
|
1045
1045
|
has the same effect.
|
|
1046
1046
|
|
|
1047
|
+
UI message streams can change this content as well. When tool errors are
|
|
1048
|
+
redacted (`redactToolErrors`, which defaults to `true` when you pass `onError`),
|
|
1049
|
+
`toUIMessageStream` sends the replacement text to the client for a failed tool
|
|
1050
|
+
call, while the model received the full error text during the multi-step call.
|
|
1051
|
+
When you convert those UI messages back with `convertToModelMessages`, the tool
|
|
1052
|
+
result differs from the one the model received, and the thinking blocks after it
|
|
1053
|
+
become invalid. By default, the client receives the same text as the model. See
|
|
1054
|
+
[Tool error text and message history](/docs/ai-sdk-ui/chatbot-tool-usage#tool-error-text-and-message-history)
|
|
1055
|
+
for the available options.
|
|
1056
|
+
|
|
1047
1057
|
If your application changes this content, set
|
|
1048
1058
|
`blockBinding.prefixMismatchBehavior` to `drop_block` (see below). The API then
|
|
1049
1059
|
drops the invalid thinking blocks instead of rejecting the request. The model
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/anthropic",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.103",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ai-sdk/provider": "4.0.
|
|
39
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
38
|
+
"@ai-sdk/provider": "4.0.38",
|
|
39
|
+
"@ai-sdk/provider-utils": "5.0.80"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@ai-sdk/test-server": "2.0.4",
|