@ai-sdk/anthropic 4.0.69 → 4.0.71
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 +10 -11
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +9 -10
- package/dist/internal/index.js.map +1 -1
- package/package.json +3 -3
- package/src/convert-to-anthropic-prompt.ts +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 4.0.71
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c35458e: fix(anthropic): preserve invalid toolset calls
|
|
8
|
+
|
|
9
|
+
## 4.0.70
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [8c65988]
|
|
14
|
+
- Updated dependencies [527a163]
|
|
15
|
+
- @ai-sdk/provider@4.0.21
|
|
16
|
+
- @ai-sdk/provider-utils@5.0.53
|
|
17
|
+
|
|
3
18
|
## 4.0.69
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -2774,20 +2774,19 @@ async function convertToAnthropicPrompt({ prompt, sendReasoning, warnings, cache
|
|
|
2774
2774
|
toolsetNames
|
|
2775
2775
|
});
|
|
2776
2776
|
if (toolsetName != null) {
|
|
2777
|
-
const
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
}
|
|
2783
|
-
|
|
2784
|
-
}
|
|
2777
|
+
const rawInput = toAnthropicToolInput(part.input);
|
|
2778
|
+
const { action } = rawInput;
|
|
2779
|
+
const hasAction = typeof action === "string";
|
|
2780
|
+
if (!hasAction) warnings.push({
|
|
2781
|
+
type: "other",
|
|
2782
|
+
message: `toolset tool call for tool ${part.toolName} is missing the action`
|
|
2783
|
+
});
|
|
2785
2784
|
anthropicContent.push({
|
|
2786
2785
|
type: "tool_use",
|
|
2787
2786
|
id: part.toolCallId,
|
|
2788
|
-
name: action,
|
|
2787
|
+
name: hasAction ? action : toolsetName,
|
|
2789
2788
|
toolset_name: toolsetName,
|
|
2790
|
-
input:
|
|
2789
|
+
input: rawInput,
|
|
2791
2790
|
...caller && { caller },
|
|
2792
2791
|
cache_control: cacheControl
|
|
2793
2792
|
});
|
|
@@ -6830,7 +6829,7 @@ var AnthropicSkills = class {
|
|
|
6830
6829
|
};
|
|
6831
6830
|
//#endregion
|
|
6832
6831
|
//#region src/version.ts
|
|
6833
|
-
const VERSION = "4.0.
|
|
6832
|
+
const VERSION = "4.0.71";
|
|
6834
6833
|
//#endregion
|
|
6835
6834
|
//#region src/anthropic-provider.ts
|
|
6836
6835
|
const ANTHROPIC_API_URL = "https://api.anthropic.com";
|