@ai-sdk/anthropic 4.0.101 → 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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 4.0.103
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [2ebc78b]
8
+ - Updated dependencies [cb4fa52]
9
+ - @ai-sdk/provider-utils@5.0.80
10
+ - @ai-sdk/provider@4.0.38
11
+
12
+ ## 4.0.102
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [4311fa1]
17
+ - Updated dependencies [4311fa1]
18
+ - @ai-sdk/provider-utils@5.0.79
19
+
3
20
  ## 4.0.101
4
21
 
5
22
  ### Patch Changes
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.101";
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";
@@ -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.101",
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.37",
39
- "@ai-sdk/provider-utils": "5.0.78"
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",
@@ -45,7 +45,7 @@
45
45
  "@vercel/ai-tsdown-config": "0.0.0",
46
46
  "tsdown": "^0.23.0",
47
47
  "typescript": "6.0.3",
48
- "zod": "3.25.76"
48
+ "zod": "4.6.7"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "zod": "^3.25.76 || ^4.1.8"