@ai-sdk/anthropic 2.0.25 → 2.0.27
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 +13 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +388 -386
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -15
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +387 -385
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +26 -14
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "@ai-sdk/provider-utils";
|
|
11
11
|
|
|
12
12
|
// src/version.ts
|
|
13
|
-
var VERSION = true ? "2.0.
|
|
13
|
+
var VERSION = true ? "2.0.27" : "0.0.0-test";
|
|
14
14
|
|
|
15
15
|
// src/anthropic-messages-language-model.ts
|
|
16
16
|
import {
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
lazySchema,
|
|
33
33
|
zodSchema
|
|
34
34
|
} from "@ai-sdk/provider-utils";
|
|
35
|
-
import
|
|
35
|
+
import { z } from "zod/v4";
|
|
36
36
|
var anthropicErrorDataSchema = lazySchema(
|
|
37
37
|
() => zodSchema(
|
|
38
38
|
z.object({
|
|
@@ -51,7 +51,7 @@ var anthropicFailedResponseHandler = createJsonErrorResponseHandler({
|
|
|
51
51
|
|
|
52
52
|
// src/anthropic-messages-api.ts
|
|
53
53
|
import { lazySchema as lazySchema2, zodSchema as zodSchema2 } from "@ai-sdk/provider-utils";
|
|
54
|
-
import
|
|
54
|
+
import { z as z2 } from "zod/v4";
|
|
55
55
|
var anthropicMessagesResponseSchema = lazySchema2(
|
|
56
56
|
() => zodSchema2(
|
|
57
57
|
z2.object({
|
|
@@ -380,7 +380,7 @@ var anthropicReasoningMetadataSchema = lazySchema2(
|
|
|
380
380
|
);
|
|
381
381
|
|
|
382
382
|
// src/anthropic-messages-options.ts
|
|
383
|
-
import
|
|
383
|
+
import { z as z3 } from "zod/v4";
|
|
384
384
|
var anthropicFilePartProviderOptions = z3.object({
|
|
385
385
|
/**
|
|
386
386
|
* Citation configuration for this document.
|
|
@@ -440,7 +440,7 @@ function getCacheControl(providerMetadata) {
|
|
|
440
440
|
|
|
441
441
|
// src/tool/text-editor_20250728.ts
|
|
442
442
|
import { createProviderDefinedToolFactory } from "@ai-sdk/provider-utils";
|
|
443
|
-
import
|
|
443
|
+
import { z as z4 } from "zod/v4";
|
|
444
444
|
import { lazySchema as lazySchema3, zodSchema as zodSchema3 } from "@ai-sdk/provider-utils";
|
|
445
445
|
var textEditor_20250728ArgsSchema = lazySchema3(
|
|
446
446
|
() => zodSchema3(
|
|
@@ -477,7 +477,7 @@ import {
|
|
|
477
477
|
lazySchema as lazySchema4,
|
|
478
478
|
zodSchema as zodSchema4
|
|
479
479
|
} from "@ai-sdk/provider-utils";
|
|
480
|
-
import
|
|
480
|
+
import { z as z5 } from "zod/v4";
|
|
481
481
|
var webSearch_20250305ArgsSchema = lazySchema4(
|
|
482
482
|
() => zodSchema4(
|
|
483
483
|
z5.object({
|
|
@@ -530,7 +530,7 @@ import {
|
|
|
530
530
|
lazySchema as lazySchema5,
|
|
531
531
|
zodSchema as zodSchema5
|
|
532
532
|
} from "@ai-sdk/provider-utils";
|
|
533
|
-
import
|
|
533
|
+
import { z as z6 } from "zod/v4";
|
|
534
534
|
var webFetch_20250910ArgsSchema = lazySchema5(
|
|
535
535
|
() => zodSchema5(
|
|
536
536
|
z6.object({
|
|
@@ -808,7 +808,7 @@ import {
|
|
|
808
808
|
lazySchema as lazySchema6,
|
|
809
809
|
zodSchema as zodSchema6
|
|
810
810
|
} from "@ai-sdk/provider-utils";
|
|
811
|
-
import
|
|
811
|
+
import { z as z7 } from "zod/v4";
|
|
812
812
|
var codeExecution_20250522OutputSchema = lazySchema6(
|
|
813
813
|
() => zodSchema6(
|
|
814
814
|
z7.object({
|
|
@@ -1023,6 +1023,18 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
1023
1023
|
cache_control: void 0
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
1026
|
+
if (contentPart.mediaType === "application/pdf") {
|
|
1027
|
+
betas.add("pdfs-2024-09-25");
|
|
1028
|
+
return {
|
|
1029
|
+
type: "document",
|
|
1030
|
+
source: {
|
|
1031
|
+
type: "base64",
|
|
1032
|
+
media_type: contentPart.mediaType,
|
|
1033
|
+
data: contentPart.data
|
|
1034
|
+
},
|
|
1035
|
+
cache_control: void 0
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1026
1038
|
throw new UnsupportedFunctionalityError2({
|
|
1027
1039
|
functionality: `media type: ${contentPart.mediaType}`
|
|
1028
1040
|
});
|
|
@@ -2221,7 +2233,7 @@ import {
|
|
|
2221
2233
|
lazySchema as lazySchema7,
|
|
2222
2234
|
zodSchema as zodSchema7
|
|
2223
2235
|
} from "@ai-sdk/provider-utils";
|
|
2224
|
-
import
|
|
2236
|
+
import { z as z8 } from "zod/v4";
|
|
2225
2237
|
var bash_20241022InputSchema = lazySchema7(
|
|
2226
2238
|
() => zodSchema7(
|
|
2227
2239
|
z8.object({
|
|
@@ -2242,7 +2254,7 @@ import {
|
|
|
2242
2254
|
lazySchema as lazySchema8,
|
|
2243
2255
|
zodSchema as zodSchema8
|
|
2244
2256
|
} from "@ai-sdk/provider-utils";
|
|
2245
|
-
import
|
|
2257
|
+
import { z as z9 } from "zod/v4";
|
|
2246
2258
|
var bash_20250124InputSchema = lazySchema8(
|
|
2247
2259
|
() => zodSchema8(
|
|
2248
2260
|
z9.object({
|
|
@@ -2263,7 +2275,7 @@ import {
|
|
|
2263
2275
|
lazySchema as lazySchema9,
|
|
2264
2276
|
zodSchema as zodSchema9
|
|
2265
2277
|
} from "@ai-sdk/provider-utils";
|
|
2266
|
-
import
|
|
2278
|
+
import { z as z10 } from "zod/v4";
|
|
2267
2279
|
var computer_20241022InputSchema = lazySchema9(
|
|
2268
2280
|
() => zodSchema9(
|
|
2269
2281
|
z10.object({
|
|
@@ -2296,7 +2308,7 @@ import {
|
|
|
2296
2308
|
lazySchema as lazySchema10,
|
|
2297
2309
|
zodSchema as zodSchema10
|
|
2298
2310
|
} from "@ai-sdk/provider-utils";
|
|
2299
|
-
import
|
|
2311
|
+
import { z as z11 } from "zod/v4";
|
|
2300
2312
|
var computer_20250124InputSchema = lazySchema10(
|
|
2301
2313
|
() => zodSchema10(
|
|
2302
2314
|
z11.object({
|
|
@@ -2339,7 +2351,7 @@ import {
|
|
|
2339
2351
|
lazySchema as lazySchema11,
|
|
2340
2352
|
zodSchema as zodSchema11
|
|
2341
2353
|
} from "@ai-sdk/provider-utils";
|
|
2342
|
-
import
|
|
2354
|
+
import { z as z12 } from "zod/v4";
|
|
2343
2355
|
var textEditor_20241022InputSchema = lazySchema11(
|
|
2344
2356
|
() => zodSchema11(
|
|
2345
2357
|
z12.object({
|
|
@@ -2365,7 +2377,7 @@ import {
|
|
|
2365
2377
|
lazySchema as lazySchema12,
|
|
2366
2378
|
zodSchema as zodSchema12
|
|
2367
2379
|
} from "@ai-sdk/provider-utils";
|
|
2368
|
-
import
|
|
2380
|
+
import { z as z13 } from "zod/v4";
|
|
2369
2381
|
var textEditor_20250124InputSchema = lazySchema12(
|
|
2370
2382
|
() => zodSchema12(
|
|
2371
2383
|
z13.object({
|
|
@@ -2391,7 +2403,7 @@ import {
|
|
|
2391
2403
|
lazySchema as lazySchema13,
|
|
2392
2404
|
zodSchema as zodSchema13
|
|
2393
2405
|
} from "@ai-sdk/provider-utils";
|
|
2394
|
-
import
|
|
2406
|
+
import { z as z14 } from "zod/v4";
|
|
2395
2407
|
var textEditor_20250429InputSchema = lazySchema13(
|
|
2396
2408
|
() => zodSchema13(
|
|
2397
2409
|
z14.object({
|