@ai-sdk/anthropic 2.0.23 → 2.0.24
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +356 -356
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -13
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +355 -355
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +12 -12
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/internal/index.mjs
CHANGED
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
postJsonToApi,
|
|
12
12
|
resolve
|
|
13
13
|
} from "@ai-sdk/provider-utils";
|
|
14
|
-
import
|
|
14
|
+
import * as z7 from "zod/v4";
|
|
15
15
|
|
|
16
16
|
// src/anthropic-error.ts
|
|
17
17
|
import { createJsonErrorResponseHandler } from "@ai-sdk/provider-utils";
|
|
18
|
-
import
|
|
18
|
+
import * as z from "zod/v4";
|
|
19
19
|
var anthropicErrorDataSchema = z.object({
|
|
20
20
|
type: z.literal("error"),
|
|
21
21
|
error: z.object({
|
|
@@ -29,7 +29,7 @@ var anthropicFailedResponseHandler = createJsonErrorResponseHandler({
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
// src/anthropic-messages-options.ts
|
|
32
|
-
import
|
|
32
|
+
import * as z2 from "zod/v4";
|
|
33
33
|
var anthropicFilePartProviderOptions = z2.object({
|
|
34
34
|
/**
|
|
35
35
|
* Citation configuration for this document.
|
|
@@ -89,7 +89,7 @@ function getCacheControl(providerMetadata) {
|
|
|
89
89
|
|
|
90
90
|
// src/tool/text-editor_20250728.ts
|
|
91
91
|
import { createProviderDefinedToolFactory } from "@ai-sdk/provider-utils";
|
|
92
|
-
import
|
|
92
|
+
import * as z3 from "zod/v4";
|
|
93
93
|
var textEditor_20250728ArgsSchema = z3.object({
|
|
94
94
|
maxCharacters: z3.number().optional()
|
|
95
95
|
});
|
|
@@ -112,7 +112,7 @@ var textEditor_20250728 = (args = {}) => {
|
|
|
112
112
|
|
|
113
113
|
// src/tool/web-search_20250305.ts
|
|
114
114
|
import { createProviderDefinedToolFactoryWithOutputSchema } from "@ai-sdk/provider-utils";
|
|
115
|
-
import
|
|
115
|
+
import * as z4 from "zod/v4";
|
|
116
116
|
var webSearch_20250305ArgsSchema = z4.object({
|
|
117
117
|
maxUses: z4.number().optional(),
|
|
118
118
|
allowedDomains: z4.array(z4.string()).optional(),
|
|
@@ -148,7 +148,7 @@ var webSearch_20250305 = (args = {}) => {
|
|
|
148
148
|
|
|
149
149
|
// src/tool/web-fetch-20250910.ts
|
|
150
150
|
import { createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema2 } from "@ai-sdk/provider-utils";
|
|
151
|
-
import
|
|
151
|
+
import * as z5 from "zod/v4";
|
|
152
152
|
var webFetch_20250910ArgsSchema = z5.object({
|
|
153
153
|
maxUses: z5.number().optional(),
|
|
154
154
|
allowedDomains: z5.array(z5.string()).optional(),
|
|
@@ -395,7 +395,7 @@ import { convertToBase64, parseProviderOptions } from "@ai-sdk/provider-utils";
|
|
|
395
395
|
|
|
396
396
|
// src/tool/code-execution_20250522.ts
|
|
397
397
|
import { createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema3 } from "@ai-sdk/provider-utils";
|
|
398
|
-
import
|
|
398
|
+
import * as z6 from "zod/v4";
|
|
399
399
|
var codeExecution_20250522OutputSchema = z6.object({
|
|
400
400
|
type: z6.literal("code_execution_result"),
|
|
401
401
|
stdout: z6.string(),
|
|
@@ -2118,7 +2118,7 @@ var bash_20250124 = createProviderDefinedToolFactory3({
|
|
|
2118
2118
|
|
|
2119
2119
|
// src/tool/computer_20241022.ts
|
|
2120
2120
|
import { createProviderDefinedToolFactory as createProviderDefinedToolFactory4 } from "@ai-sdk/provider-utils";
|
|
2121
|
-
import
|
|
2121
|
+
import * as z10 from "zod/v4";
|
|
2122
2122
|
var computer_20241022 = createProviderDefinedToolFactory4({
|
|
2123
2123
|
id: "anthropic.computer_20241022",
|
|
2124
2124
|
name: "computer",
|
|
@@ -2142,7 +2142,7 @@ var computer_20241022 = createProviderDefinedToolFactory4({
|
|
|
2142
2142
|
|
|
2143
2143
|
// src/tool/computer_20250124.ts
|
|
2144
2144
|
import { createProviderDefinedToolFactory as createProviderDefinedToolFactory5 } from "@ai-sdk/provider-utils";
|
|
2145
|
-
import
|
|
2145
|
+
import * as z11 from "zod/v4";
|
|
2146
2146
|
var computer_20250124 = createProviderDefinedToolFactory5({
|
|
2147
2147
|
id: "anthropic.computer_20250124",
|
|
2148
2148
|
name: "computer",
|
|
@@ -2176,7 +2176,7 @@ var computer_20250124 = createProviderDefinedToolFactory5({
|
|
|
2176
2176
|
|
|
2177
2177
|
// src/tool/text-editor_20241022.ts
|
|
2178
2178
|
import { createProviderDefinedToolFactory as createProviderDefinedToolFactory6 } from "@ai-sdk/provider-utils";
|
|
2179
|
-
import
|
|
2179
|
+
import * as z12 from "zod/v4";
|
|
2180
2180
|
var textEditor_20241022 = createProviderDefinedToolFactory6({
|
|
2181
2181
|
id: "anthropic.text_editor_20241022",
|
|
2182
2182
|
name: "str_replace_editor",
|
|
@@ -2193,7 +2193,7 @@ var textEditor_20241022 = createProviderDefinedToolFactory6({
|
|
|
2193
2193
|
|
|
2194
2194
|
// src/tool/text-editor_20250124.ts
|
|
2195
2195
|
import { createProviderDefinedToolFactory as createProviderDefinedToolFactory7 } from "@ai-sdk/provider-utils";
|
|
2196
|
-
import
|
|
2196
|
+
import * as z13 from "zod/v4";
|
|
2197
2197
|
var textEditor_20250124 = createProviderDefinedToolFactory7({
|
|
2198
2198
|
id: "anthropic.text_editor_20250124",
|
|
2199
2199
|
name: "str_replace_editor",
|
|
@@ -2210,7 +2210,7 @@ var textEditor_20250124 = createProviderDefinedToolFactory7({
|
|
|
2210
2210
|
|
|
2211
2211
|
// src/tool/text-editor_20250429.ts
|
|
2212
2212
|
import { createProviderDefinedToolFactory as createProviderDefinedToolFactory8 } from "@ai-sdk/provider-utils";
|
|
2213
|
-
import
|
|
2213
|
+
import * as z14 from "zod/v4";
|
|
2214
2214
|
var textEditor_20250429 = createProviderDefinedToolFactory8({
|
|
2215
2215
|
id: "anthropic.text_editor_20250429",
|
|
2216
2216
|
name: "str_replace_based_edit_tool",
|