@ai-sdk/anthropic 3.0.0-beta.97 → 3.0.0
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 +167 -0
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +13 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +13 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@ai-sdk/provider-utils";
|
|
12
12
|
|
|
13
13
|
// src/version.ts
|
|
14
|
-
var VERSION = true ? "3.0.0
|
|
14
|
+
var VERSION = true ? "3.0.0" : "0.0.0-test";
|
|
15
15
|
|
|
16
16
|
// src/anthropic-messages-language-model.ts
|
|
17
17
|
import {
|
|
@@ -2129,6 +2129,19 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
2129
2129
|
}
|
|
2130
2130
|
if (providerToolName === "web_fetch") {
|
|
2131
2131
|
const output = part.output;
|
|
2132
|
+
if (output.type === "error-json") {
|
|
2133
|
+
const errorValue = JSON.parse(output.value);
|
|
2134
|
+
anthropicContent.push({
|
|
2135
|
+
type: "web_fetch_tool_result",
|
|
2136
|
+
tool_use_id: part.toolCallId,
|
|
2137
|
+
content: {
|
|
2138
|
+
type: "web_fetch_tool_result_error",
|
|
2139
|
+
error_code: errorValue.errorCode
|
|
2140
|
+
},
|
|
2141
|
+
cache_control: cacheControl
|
|
2142
|
+
});
|
|
2143
|
+
break;
|
|
2144
|
+
}
|
|
2132
2145
|
if (output.type !== "json") {
|
|
2133
2146
|
warnings.push({
|
|
2134
2147
|
type: "other",
|