@ai-sdk/anthropic 4.0.8 → 4.0.9
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 +6 -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/package.json +1 -1
- package/src/convert-to-anthropic-prompt.ts +10 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2891,7 +2891,7 @@ async function convertToAnthropicPrompt({
|
|
|
2891
2891
|
type: "tool_use",
|
|
2892
2892
|
id: part.toolCallId,
|
|
2893
2893
|
name: part.toolName,
|
|
2894
|
-
input: part.input,
|
|
2894
|
+
input: toAnthropicToolInput(part.input),
|
|
2895
2895
|
...caller && { caller },
|
|
2896
2896
|
cache_control: cacheControl
|
|
2897
2897
|
});
|
|
@@ -3291,6 +3291,9 @@ function moveToolUseBlocksToEnd(content) {
|
|
|
3291
3291
|
flushSegment();
|
|
3292
3292
|
return result;
|
|
3293
3293
|
}
|
|
3294
|
+
function toAnthropicToolInput(input) {
|
|
3295
|
+
return typeof input === "object" && input !== null && !Array.isArray(input) ? input : { rawInvalidInput: input };
|
|
3296
|
+
}
|
|
3294
3297
|
|
|
3295
3298
|
// src/map-anthropic-stop-reason.ts
|
|
3296
3299
|
function mapAnthropicStopReason({
|
|
@@ -6292,7 +6295,7 @@ var AnthropicSkills = class {
|
|
|
6292
6295
|
};
|
|
6293
6296
|
|
|
6294
6297
|
// src/version.ts
|
|
6295
|
-
var VERSION = true ? "4.0.
|
|
6298
|
+
var VERSION = true ? "4.0.9" : "0.0.0-test";
|
|
6296
6299
|
|
|
6297
6300
|
// src/anthropic-provider.ts
|
|
6298
6301
|
var ANTHROPIC_API_URL = "https://api.anthropic.com";
|