@ai-sdk/anthropic 3.0.0-beta.64 → 3.0.0-beta.66
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 +18 -0
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +16 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -42
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +13 -13
- package/dist/internal/index.d.ts +13 -13
- package/dist/internal/index.js +15 -28
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +28 -41
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/internal/index.mjs
CHANGED
|
@@ -698,7 +698,7 @@ var CacheControlValidator = class {
|
|
|
698
698
|
};
|
|
699
699
|
|
|
700
700
|
// src/tool/text-editor_20250728.ts
|
|
701
|
-
import {
|
|
701
|
+
import { createProviderToolFactory } from "@ai-sdk/provider-utils";
|
|
702
702
|
import { z as z4 } from "zod/v4";
|
|
703
703
|
import { lazySchema as lazySchema3, zodSchema as zodSchema3 } from "@ai-sdk/provider-utils";
|
|
704
704
|
var textEditor_20250728ArgsSchema = lazySchema3(
|
|
@@ -721,9 +721,8 @@ var textEditor_20250728InputSchema = lazySchema3(
|
|
|
721
721
|
})
|
|
722
722
|
)
|
|
723
723
|
);
|
|
724
|
-
var factory =
|
|
724
|
+
var factory = createProviderToolFactory({
|
|
725
725
|
id: "anthropic.text_editor_20250728",
|
|
726
|
-
name: "str_replace_based_edit_tool",
|
|
727
726
|
inputSchema: textEditor_20250728InputSchema
|
|
728
727
|
});
|
|
729
728
|
var textEditor_20250728 = (args = {}) => {
|
|
@@ -732,7 +731,7 @@ var textEditor_20250728 = (args = {}) => {
|
|
|
732
731
|
|
|
733
732
|
// src/tool/web-search_20250305.ts
|
|
734
733
|
import {
|
|
735
|
-
|
|
734
|
+
createProviderToolFactoryWithOutputSchema,
|
|
736
735
|
lazySchema as lazySchema4,
|
|
737
736
|
zodSchema as zodSchema4
|
|
738
737
|
} from "@ai-sdk/provider-utils";
|
|
@@ -773,9 +772,8 @@ var webSearch_20250305InputSchema = lazySchema4(
|
|
|
773
772
|
})
|
|
774
773
|
)
|
|
775
774
|
);
|
|
776
|
-
var factory2 =
|
|
775
|
+
var factory2 = createProviderToolFactoryWithOutputSchema({
|
|
777
776
|
id: "anthropic.web_search_20250305",
|
|
778
|
-
name: "web_search",
|
|
779
777
|
inputSchema: webSearch_20250305InputSchema,
|
|
780
778
|
outputSchema: webSearch_20250305OutputSchema
|
|
781
779
|
});
|
|
@@ -785,7 +783,7 @@ var webSearch_20250305 = (args = {}) => {
|
|
|
785
783
|
|
|
786
784
|
// src/tool/web-fetch-20250910.ts
|
|
787
785
|
import {
|
|
788
|
-
|
|
786
|
+
createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema2,
|
|
789
787
|
lazySchema as lazySchema5,
|
|
790
788
|
zodSchema as zodSchema5
|
|
791
789
|
} from "@ai-sdk/provider-utils";
|
|
@@ -834,9 +832,8 @@ var webFetch_20250910InputSchema = lazySchema5(
|
|
|
834
832
|
})
|
|
835
833
|
)
|
|
836
834
|
);
|
|
837
|
-
var factory3 =
|
|
835
|
+
var factory3 = createProviderToolFactoryWithOutputSchema2({
|
|
838
836
|
id: "anthropic.web_fetch_20250910",
|
|
839
|
-
name: "web_fetch",
|
|
840
837
|
inputSchema: webFetch_20250910InputSchema,
|
|
841
838
|
outputSchema: webFetch_20250910OutputSchema
|
|
842
839
|
});
|
|
@@ -875,7 +872,7 @@ async function prepareTools({
|
|
|
875
872
|
});
|
|
876
873
|
break;
|
|
877
874
|
}
|
|
878
|
-
case "provider
|
|
875
|
+
case "provider": {
|
|
879
876
|
switch (tool.id) {
|
|
880
877
|
case "anthropic.code_execution_20250522": {
|
|
881
878
|
betas.add("code-execution-2025-05-22");
|
|
@@ -1102,7 +1099,7 @@ import {
|
|
|
1102
1099
|
|
|
1103
1100
|
// src/tool/code-execution_20250522.ts
|
|
1104
1101
|
import {
|
|
1105
|
-
|
|
1102
|
+
createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema3,
|
|
1106
1103
|
lazySchema as lazySchema6,
|
|
1107
1104
|
zodSchema as zodSchema6
|
|
1108
1105
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1124,9 +1121,8 @@ var codeExecution_20250522InputSchema = lazySchema6(
|
|
|
1124
1121
|
})
|
|
1125
1122
|
)
|
|
1126
1123
|
);
|
|
1127
|
-
var factory4 =
|
|
1124
|
+
var factory4 = createProviderToolFactoryWithOutputSchema3({
|
|
1128
1125
|
id: "anthropic.code_execution_20250522",
|
|
1129
|
-
name: "code_execution",
|
|
1130
1126
|
inputSchema: codeExecution_20250522InputSchema,
|
|
1131
1127
|
outputSchema: codeExecution_20250522OutputSchema
|
|
1132
1128
|
});
|
|
@@ -1136,7 +1132,7 @@ var codeExecution_20250522 = (args = {}) => {
|
|
|
1136
1132
|
|
|
1137
1133
|
// src/tool/code-execution_20250825.ts
|
|
1138
1134
|
import {
|
|
1139
|
-
|
|
1135
|
+
createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema4,
|
|
1140
1136
|
lazySchema as lazySchema7,
|
|
1141
1137
|
zodSchema as zodSchema7
|
|
1142
1138
|
} from "@ai-sdk/provider-utils";
|
|
@@ -1217,9 +1213,8 @@ var codeExecution_20250825InputSchema = lazySchema7(
|
|
|
1217
1213
|
])
|
|
1218
1214
|
)
|
|
1219
1215
|
);
|
|
1220
|
-
var factory5 =
|
|
1216
|
+
var factory5 = createProviderToolFactoryWithOutputSchema4({
|
|
1221
1217
|
id: "anthropic.code_execution_20250825",
|
|
1222
|
-
name: "code_execution",
|
|
1223
1218
|
inputSchema: codeExecution_20250825InputSchema,
|
|
1224
1219
|
outputSchema: codeExecution_20250825OutputSchema
|
|
1225
1220
|
});
|
|
@@ -2095,7 +2090,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2095
2090
|
betas.add("skills-2025-10-02");
|
|
2096
2091
|
betas.add("files-api-2025-04-14");
|
|
2097
2092
|
if (!(tools == null ? void 0 : tools.some(
|
|
2098
|
-
(tool) => tool.type === "provider
|
|
2093
|
+
(tool) => tool.type === "provider" && tool.id === "anthropic.code_execution_20250825"
|
|
2099
2094
|
))) {
|
|
2100
2095
|
warnings.push({
|
|
2101
2096
|
type: "other",
|
|
@@ -3101,7 +3096,7 @@ function getModelCapabilities(modelId) {
|
|
|
3101
3096
|
|
|
3102
3097
|
// src/tool/bash_20241022.ts
|
|
3103
3098
|
import {
|
|
3104
|
-
|
|
3099
|
+
createProviderToolFactory as createProviderToolFactory2,
|
|
3105
3100
|
lazySchema as lazySchema8,
|
|
3106
3101
|
zodSchema as zodSchema8
|
|
3107
3102
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3114,15 +3109,14 @@ var bash_20241022InputSchema = lazySchema8(
|
|
|
3114
3109
|
})
|
|
3115
3110
|
)
|
|
3116
3111
|
);
|
|
3117
|
-
var bash_20241022 =
|
|
3112
|
+
var bash_20241022 = createProviderToolFactory2({
|
|
3118
3113
|
id: "anthropic.bash_20241022",
|
|
3119
|
-
name: "bash",
|
|
3120
3114
|
inputSchema: bash_20241022InputSchema
|
|
3121
3115
|
});
|
|
3122
3116
|
|
|
3123
3117
|
// src/tool/bash_20250124.ts
|
|
3124
3118
|
import {
|
|
3125
|
-
|
|
3119
|
+
createProviderToolFactory as createProviderToolFactory3,
|
|
3126
3120
|
lazySchema as lazySchema9,
|
|
3127
3121
|
zodSchema as zodSchema9
|
|
3128
3122
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3135,15 +3129,14 @@ var bash_20250124InputSchema = lazySchema9(
|
|
|
3135
3129
|
})
|
|
3136
3130
|
)
|
|
3137
3131
|
);
|
|
3138
|
-
var bash_20250124 =
|
|
3132
|
+
var bash_20250124 = createProviderToolFactory3({
|
|
3139
3133
|
id: "anthropic.bash_20250124",
|
|
3140
|
-
name: "bash",
|
|
3141
3134
|
inputSchema: bash_20250124InputSchema
|
|
3142
3135
|
});
|
|
3143
3136
|
|
|
3144
3137
|
// src/tool/computer_20241022.ts
|
|
3145
3138
|
import {
|
|
3146
|
-
|
|
3139
|
+
createProviderToolFactory as createProviderToolFactory4,
|
|
3147
3140
|
lazySchema as lazySchema10,
|
|
3148
3141
|
zodSchema as zodSchema10
|
|
3149
3142
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3168,15 +3161,14 @@ var computer_20241022InputSchema = lazySchema10(
|
|
|
3168
3161
|
})
|
|
3169
3162
|
)
|
|
3170
3163
|
);
|
|
3171
|
-
var computer_20241022 =
|
|
3164
|
+
var computer_20241022 = createProviderToolFactory4({
|
|
3172
3165
|
id: "anthropic.computer_20241022",
|
|
3173
|
-
name: "computer",
|
|
3174
3166
|
inputSchema: computer_20241022InputSchema
|
|
3175
3167
|
});
|
|
3176
3168
|
|
|
3177
3169
|
// src/tool/computer_20250124.ts
|
|
3178
3170
|
import {
|
|
3179
|
-
|
|
3171
|
+
createProviderToolFactory as createProviderToolFactory5,
|
|
3180
3172
|
lazySchema as lazySchema11,
|
|
3181
3173
|
zodSchema as zodSchema11
|
|
3182
3174
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3211,15 +3203,14 @@ var computer_20250124InputSchema = lazySchema11(
|
|
|
3211
3203
|
})
|
|
3212
3204
|
)
|
|
3213
3205
|
);
|
|
3214
|
-
var computer_20250124 =
|
|
3206
|
+
var computer_20250124 = createProviderToolFactory5({
|
|
3215
3207
|
id: "anthropic.computer_20250124",
|
|
3216
|
-
name: "computer",
|
|
3217
3208
|
inputSchema: computer_20250124InputSchema
|
|
3218
3209
|
});
|
|
3219
3210
|
|
|
3220
3211
|
// src/tool/memory_20250818.ts
|
|
3221
3212
|
import {
|
|
3222
|
-
|
|
3213
|
+
createProviderToolFactory as createProviderToolFactory6,
|
|
3223
3214
|
lazySchema as lazySchema12,
|
|
3224
3215
|
zodSchema as zodSchema12
|
|
3225
3216
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3261,15 +3252,14 @@ var memory_20250818InputSchema = lazySchema12(
|
|
|
3261
3252
|
])
|
|
3262
3253
|
)
|
|
3263
3254
|
);
|
|
3264
|
-
var memory_20250818 =
|
|
3255
|
+
var memory_20250818 = createProviderToolFactory6({
|
|
3265
3256
|
id: "anthropic.memory_20250818",
|
|
3266
|
-
name: "memory",
|
|
3267
3257
|
inputSchema: memory_20250818InputSchema
|
|
3268
3258
|
});
|
|
3269
3259
|
|
|
3270
3260
|
// src/tool/text-editor_20241022.ts
|
|
3271
3261
|
import {
|
|
3272
|
-
|
|
3262
|
+
createProviderToolFactory as createProviderToolFactory7,
|
|
3273
3263
|
lazySchema as lazySchema13,
|
|
3274
3264
|
zodSchema as zodSchema13
|
|
3275
3265
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3287,15 +3277,14 @@ var textEditor_20241022InputSchema = lazySchema13(
|
|
|
3287
3277
|
})
|
|
3288
3278
|
)
|
|
3289
3279
|
);
|
|
3290
|
-
var textEditor_20241022 =
|
|
3280
|
+
var textEditor_20241022 = createProviderToolFactory7({
|
|
3291
3281
|
id: "anthropic.text_editor_20241022",
|
|
3292
|
-
name: "str_replace_editor",
|
|
3293
3282
|
inputSchema: textEditor_20241022InputSchema
|
|
3294
3283
|
});
|
|
3295
3284
|
|
|
3296
3285
|
// src/tool/text-editor_20250124.ts
|
|
3297
3286
|
import {
|
|
3298
|
-
|
|
3287
|
+
createProviderToolFactory as createProviderToolFactory8,
|
|
3299
3288
|
lazySchema as lazySchema14,
|
|
3300
3289
|
zodSchema as zodSchema14
|
|
3301
3290
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3313,15 +3302,14 @@ var textEditor_20250124InputSchema = lazySchema14(
|
|
|
3313
3302
|
})
|
|
3314
3303
|
)
|
|
3315
3304
|
);
|
|
3316
|
-
var textEditor_20250124 =
|
|
3305
|
+
var textEditor_20250124 = createProviderToolFactory8({
|
|
3317
3306
|
id: "anthropic.text_editor_20250124",
|
|
3318
|
-
name: "str_replace_editor",
|
|
3319
3307
|
inputSchema: textEditor_20250124InputSchema
|
|
3320
3308
|
});
|
|
3321
3309
|
|
|
3322
3310
|
// src/tool/text-editor_20250429.ts
|
|
3323
3311
|
import {
|
|
3324
|
-
|
|
3312
|
+
createProviderToolFactory as createProviderToolFactory9,
|
|
3325
3313
|
lazySchema as lazySchema15,
|
|
3326
3314
|
zodSchema as zodSchema15
|
|
3327
3315
|
} from "@ai-sdk/provider-utils";
|
|
@@ -3339,9 +3327,8 @@ var textEditor_20250429InputSchema = lazySchema15(
|
|
|
3339
3327
|
})
|
|
3340
3328
|
)
|
|
3341
3329
|
);
|
|
3342
|
-
var textEditor_20250429 =
|
|
3330
|
+
var textEditor_20250429 = createProviderToolFactory9({
|
|
3343
3331
|
id: "anthropic.text_editor_20250429",
|
|
3344
|
-
name: "str_replace_based_edit_tool",
|
|
3345
3332
|
inputSchema: textEditor_20250429InputSchema
|
|
3346
3333
|
});
|
|
3347
3334
|
|