@ai-sdk/anthropic 3.0.46 → 3.0.48

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.
@@ -115,6 +115,10 @@ var anthropicMessagesResponseSchema = (0, import_provider_utils2.lazySchema)(
115
115
  type: import_v42.z.literal("code_execution_20250825"),
116
116
  tool_id: import_v42.z.string()
117
117
  }),
118
+ import_v42.z.object({
119
+ type: import_v42.z.literal("code_execution_20260120"),
120
+ tool_id: import_v42.z.string()
121
+ }),
118
122
  import_v42.z.object({
119
123
  type: import_v42.z.literal("direct")
120
124
  })
@@ -371,6 +375,10 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
371
375
  type: import_v42.z.literal("code_execution_20250825"),
372
376
  tool_id: import_v42.z.string()
373
377
  }),
378
+ import_v42.z.object({
379
+ type: import_v42.z.literal("code_execution_20260120"),
380
+ tool_id: import_v42.z.string()
381
+ }),
374
382
  import_v42.z.object({
375
383
  type: import_v42.z.literal("direct")
376
384
  })
@@ -409,6 +417,10 @@ var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
409
417
  type: import_v42.z.literal("code_execution_20250825"),
410
418
  tool_id: import_v42.z.string()
411
419
  }),
420
+ import_v42.z.object({
421
+ type: import_v42.z.literal("code_execution_20260120"),
422
+ tool_id: import_v42.z.string()
423
+ }),
412
424
  import_v42.z.object({
413
425
  type: import_v42.z.literal("direct")
414
426
  })
@@ -1158,6 +1170,13 @@ async function prepareTools({
1158
1170
  });
1159
1171
  break;
1160
1172
  }
1173
+ case "anthropic.code_execution_20260120": {
1174
+ anthropicTools2.push({
1175
+ type: "code_execution_20260120",
1176
+ name: "code_execution"
1177
+ });
1178
+ break;
1179
+ }
1161
1180
  case "anthropic.computer_20250124": {
1162
1181
  betas.add("computer-use-2025-01-24");
1163
1182
  anthropicTools2.push({
@@ -2085,8 +2104,8 @@ async function convertToAnthropicMessagesPrompt({
2085
2104
  break;
2086
2105
  }
2087
2106
  const callerOptions = (_l = part.providerOptions) == null ? void 0 : _l.anthropic;
2088
- const caller = (callerOptions == null ? void 0 : callerOptions.caller) ? callerOptions.caller.type === "code_execution_20250825" && callerOptions.caller.toolId ? {
2089
- type: "code_execution_20250825",
2107
+ const caller = (callerOptions == null ? void 0 : callerOptions.caller) ? (callerOptions.caller.type === "code_execution_20250825" || callerOptions.caller.type === "code_execution_20260120") && callerOptions.caller.toolId ? {
2108
+ type: callerOptions.caller.type,
2090
2109
  tool_id: callerOptions.caller.toolId
2091
2110
  } : callerOptions.caller.type === "direct" ? { type: "direct" } : void 0 : void 0;
2092
2111
  anthropicContent.push({
@@ -2592,6 +2611,7 @@ var AnthropicMessagesLanguageModel = class {
2592
2611
  providerToolNames: {
2593
2612
  "anthropic.code_execution_20250522": "code_execution",
2594
2613
  "anthropic.code_execution_20250825": "code_execution",
2614
+ "anthropic.code_execution_20260120": "code_execution",
2595
2615
  "anthropic.computer_20241022": "computer",
2596
2616
  "anthropic.computer_20250124": "computer",
2597
2617
  "anthropic.text_editor_20241022": "str_replace_editor",
@@ -2640,6 +2660,9 @@ var AnthropicMessagesLanguageModel = class {
2640
2660
  ...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
2641
2661
  speed: anthropicOptions.speed
2642
2662
  },
2663
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.cacheControl) && {
2664
+ cache_control: anthropicOptions.cacheControl
2665
+ },
2643
2666
  // structured output:
2644
2667
  ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
2645
2668
  output_format: {
@@ -2803,7 +2826,7 @@ var AnthropicMessagesLanguageModel = class {
2803
2826
  betas.add("skills-2025-10-02");
2804
2827
  betas.add("files-api-2025-04-14");
2805
2828
  if (!(tools == null ? void 0 : tools.some(
2806
- (tool) => tool.type === "provider" && tool.id === "anthropic.code_execution_20250825"
2829
+ (tool) => tool.type === "provider" && (tool.id === "anthropic.code_execution_20250825" || tool.id === "anthropic.code_execution_20260120")
2807
2830
  ))) {
2808
2831
  warnings.push({
2809
2832
  type: "other",
@@ -4181,13 +4204,118 @@ var bash_20250124 = (0, import_provider_utils14.createProviderToolFactory)({
4181
4204
  inputSchema: bash_20250124InputSchema
4182
4205
  });
4183
4206
 
4184
- // src/tool/computer_20241022.ts
4207
+ // src/tool/code-execution_20260120.ts
4185
4208
  var import_provider_utils15 = require("@ai-sdk/provider-utils");
4186
4209
  var import_v412 = require("zod/v4");
4187
- var computer_20241022InputSchema = (0, import_provider_utils15.lazySchema)(
4210
+ var codeExecution_20260120OutputSchema = (0, import_provider_utils15.lazySchema)(
4211
+ () => (0, import_provider_utils15.zodSchema)(
4212
+ import_v412.z.discriminatedUnion("type", [
4213
+ import_v412.z.object({
4214
+ type: import_v412.z.literal("code_execution_result"),
4215
+ stdout: import_v412.z.string(),
4216
+ stderr: import_v412.z.string(),
4217
+ return_code: import_v412.z.number(),
4218
+ content: import_v412.z.array(
4219
+ import_v412.z.object({
4220
+ type: import_v412.z.literal("code_execution_output"),
4221
+ file_id: import_v412.z.string()
4222
+ })
4223
+ ).optional().default([])
4224
+ }),
4225
+ import_v412.z.object({
4226
+ type: import_v412.z.literal("bash_code_execution_result"),
4227
+ content: import_v412.z.array(
4228
+ import_v412.z.object({
4229
+ type: import_v412.z.literal("bash_code_execution_output"),
4230
+ file_id: import_v412.z.string()
4231
+ })
4232
+ ),
4233
+ stdout: import_v412.z.string(),
4234
+ stderr: import_v412.z.string(),
4235
+ return_code: import_v412.z.number()
4236
+ }),
4237
+ import_v412.z.object({
4238
+ type: import_v412.z.literal("bash_code_execution_tool_result_error"),
4239
+ error_code: import_v412.z.string()
4240
+ }),
4241
+ import_v412.z.object({
4242
+ type: import_v412.z.literal("text_editor_code_execution_tool_result_error"),
4243
+ error_code: import_v412.z.string()
4244
+ }),
4245
+ import_v412.z.object({
4246
+ type: import_v412.z.literal("text_editor_code_execution_view_result"),
4247
+ content: import_v412.z.string(),
4248
+ file_type: import_v412.z.string(),
4249
+ num_lines: import_v412.z.number().nullable(),
4250
+ start_line: import_v412.z.number().nullable(),
4251
+ total_lines: import_v412.z.number().nullable()
4252
+ }),
4253
+ import_v412.z.object({
4254
+ type: import_v412.z.literal("text_editor_code_execution_create_result"),
4255
+ is_file_update: import_v412.z.boolean()
4256
+ }),
4257
+ import_v412.z.object({
4258
+ type: import_v412.z.literal("text_editor_code_execution_str_replace_result"),
4259
+ lines: import_v412.z.array(import_v412.z.string()).nullable(),
4260
+ new_lines: import_v412.z.number().nullable(),
4261
+ new_start: import_v412.z.number().nullable(),
4262
+ old_lines: import_v412.z.number().nullable(),
4263
+ old_start: import_v412.z.number().nullable()
4264
+ })
4265
+ ])
4266
+ )
4267
+ );
4268
+ var codeExecution_20260120InputSchema = (0, import_provider_utils15.lazySchema)(
4188
4269
  () => (0, import_provider_utils15.zodSchema)(
4189
- import_v412.z.object({
4190
- action: import_v412.z.enum([
4270
+ import_v412.z.discriminatedUnion("type", [
4271
+ import_v412.z.object({
4272
+ type: import_v412.z.literal("programmatic-tool-call"),
4273
+ code: import_v412.z.string()
4274
+ }),
4275
+ import_v412.z.object({
4276
+ type: import_v412.z.literal("bash_code_execution"),
4277
+ command: import_v412.z.string()
4278
+ }),
4279
+ import_v412.z.discriminatedUnion("command", [
4280
+ import_v412.z.object({
4281
+ type: import_v412.z.literal("text_editor_code_execution"),
4282
+ command: import_v412.z.literal("view"),
4283
+ path: import_v412.z.string()
4284
+ }),
4285
+ import_v412.z.object({
4286
+ type: import_v412.z.literal("text_editor_code_execution"),
4287
+ command: import_v412.z.literal("create"),
4288
+ path: import_v412.z.string(),
4289
+ file_text: import_v412.z.string().nullish()
4290
+ }),
4291
+ import_v412.z.object({
4292
+ type: import_v412.z.literal("text_editor_code_execution"),
4293
+ command: import_v412.z.literal("str_replace"),
4294
+ path: import_v412.z.string(),
4295
+ old_str: import_v412.z.string(),
4296
+ new_str: import_v412.z.string()
4297
+ })
4298
+ ])
4299
+ ])
4300
+ )
4301
+ );
4302
+ var factory7 = (0, import_provider_utils15.createProviderToolFactoryWithOutputSchema)({
4303
+ id: "anthropic.code_execution_20260120",
4304
+ inputSchema: codeExecution_20260120InputSchema,
4305
+ outputSchema: codeExecution_20260120OutputSchema,
4306
+ supportsDeferredResults: true
4307
+ });
4308
+ var codeExecution_20260120 = (args = {}) => {
4309
+ return factory7(args);
4310
+ };
4311
+
4312
+ // src/tool/computer_20241022.ts
4313
+ var import_provider_utils16 = require("@ai-sdk/provider-utils");
4314
+ var import_v413 = require("zod/v4");
4315
+ var computer_20241022InputSchema = (0, import_provider_utils16.lazySchema)(
4316
+ () => (0, import_provider_utils16.zodSchema)(
4317
+ import_v413.z.object({
4318
+ action: import_v413.z.enum([
4191
4319
  "key",
4192
4320
  "type",
4193
4321
  "mouse_move",
@@ -4199,23 +4327,23 @@ var computer_20241022InputSchema = (0, import_provider_utils15.lazySchema)(
4199
4327
  "screenshot",
4200
4328
  "cursor_position"
4201
4329
  ]),
4202
- coordinate: import_v412.z.array(import_v412.z.number().int()).optional(),
4203
- text: import_v412.z.string().optional()
4330
+ coordinate: import_v413.z.array(import_v413.z.number().int()).optional(),
4331
+ text: import_v413.z.string().optional()
4204
4332
  })
4205
4333
  )
4206
4334
  );
4207
- var computer_20241022 = (0, import_provider_utils15.createProviderToolFactory)({
4335
+ var computer_20241022 = (0, import_provider_utils16.createProviderToolFactory)({
4208
4336
  id: "anthropic.computer_20241022",
4209
4337
  inputSchema: computer_20241022InputSchema
4210
4338
  });
4211
4339
 
4212
4340
  // src/tool/computer_20250124.ts
4213
- var import_provider_utils16 = require("@ai-sdk/provider-utils");
4214
- var import_v413 = require("zod/v4");
4215
- var computer_20250124InputSchema = (0, import_provider_utils16.lazySchema)(
4216
- () => (0, import_provider_utils16.zodSchema)(
4217
- import_v413.z.object({
4218
- action: import_v413.z.enum([
4341
+ var import_provider_utils17 = require("@ai-sdk/provider-utils");
4342
+ var import_v414 = require("zod/v4");
4343
+ var computer_20250124InputSchema = (0, import_provider_utils17.lazySchema)(
4344
+ () => (0, import_provider_utils17.zodSchema)(
4345
+ import_v414.z.object({
4346
+ action: import_v414.z.enum([
4219
4347
  "key",
4220
4348
  "hold_key",
4221
4349
  "type",
@@ -4233,27 +4361,27 @@ var computer_20250124InputSchema = (0, import_provider_utils16.lazySchema)(
4233
4361
  "wait",
4234
4362
  "screenshot"
4235
4363
  ]),
4236
- coordinate: import_v413.z.tuple([import_v413.z.number().int(), import_v413.z.number().int()]).optional(),
4237
- duration: import_v413.z.number().optional(),
4238
- scroll_amount: import_v413.z.number().optional(),
4239
- scroll_direction: import_v413.z.enum(["up", "down", "left", "right"]).optional(),
4240
- start_coordinate: import_v413.z.tuple([import_v413.z.number().int(), import_v413.z.number().int()]).optional(),
4241
- text: import_v413.z.string().optional()
4364
+ coordinate: import_v414.z.tuple([import_v414.z.number().int(), import_v414.z.number().int()]).optional(),
4365
+ duration: import_v414.z.number().optional(),
4366
+ scroll_amount: import_v414.z.number().optional(),
4367
+ scroll_direction: import_v414.z.enum(["up", "down", "left", "right"]).optional(),
4368
+ start_coordinate: import_v414.z.tuple([import_v414.z.number().int(), import_v414.z.number().int()]).optional(),
4369
+ text: import_v414.z.string().optional()
4242
4370
  })
4243
4371
  )
4244
4372
  );
4245
- var computer_20250124 = (0, import_provider_utils16.createProviderToolFactory)({
4373
+ var computer_20250124 = (0, import_provider_utils17.createProviderToolFactory)({
4246
4374
  id: "anthropic.computer_20250124",
4247
4375
  inputSchema: computer_20250124InputSchema
4248
4376
  });
4249
4377
 
4250
4378
  // src/tool/computer_20251124.ts
4251
- var import_provider_utils17 = require("@ai-sdk/provider-utils");
4252
- var import_v414 = require("zod/v4");
4253
- var computer_20251124InputSchema = (0, import_provider_utils17.lazySchema)(
4254
- () => (0, import_provider_utils17.zodSchema)(
4255
- import_v414.z.object({
4256
- action: import_v414.z.enum([
4379
+ var import_provider_utils18 = require("@ai-sdk/provider-utils");
4380
+ var import_v415 = require("zod/v4");
4381
+ var computer_20251124InputSchema = (0, import_provider_utils18.lazySchema)(
4382
+ () => (0, import_provider_utils18.zodSchema)(
4383
+ import_v415.z.object({
4384
+ action: import_v415.z.enum([
4257
4385
  "key",
4258
4386
  "hold_key",
4259
4387
  "type",
@@ -4272,97 +4400,75 @@ var computer_20251124InputSchema = (0, import_provider_utils17.lazySchema)(
4272
4400
  "screenshot",
4273
4401
  "zoom"
4274
4402
  ]),
4275
- coordinate: import_v414.z.tuple([import_v414.z.number().int(), import_v414.z.number().int()]).optional(),
4276
- duration: import_v414.z.number().optional(),
4277
- region: import_v414.z.tuple([
4278
- import_v414.z.number().int(),
4279
- import_v414.z.number().int(),
4280
- import_v414.z.number().int(),
4281
- import_v414.z.number().int()
4403
+ coordinate: import_v415.z.tuple([import_v415.z.number().int(), import_v415.z.number().int()]).optional(),
4404
+ duration: import_v415.z.number().optional(),
4405
+ region: import_v415.z.tuple([
4406
+ import_v415.z.number().int(),
4407
+ import_v415.z.number().int(),
4408
+ import_v415.z.number().int(),
4409
+ import_v415.z.number().int()
4282
4410
  ]).optional(),
4283
- scroll_amount: import_v414.z.number().optional(),
4284
- scroll_direction: import_v414.z.enum(["up", "down", "left", "right"]).optional(),
4285
- start_coordinate: import_v414.z.tuple([import_v414.z.number().int(), import_v414.z.number().int()]).optional(),
4286
- text: import_v414.z.string().optional()
4411
+ scroll_amount: import_v415.z.number().optional(),
4412
+ scroll_direction: import_v415.z.enum(["up", "down", "left", "right"]).optional(),
4413
+ start_coordinate: import_v415.z.tuple([import_v415.z.number().int(), import_v415.z.number().int()]).optional(),
4414
+ text: import_v415.z.string().optional()
4287
4415
  })
4288
4416
  )
4289
4417
  );
4290
- var computer_20251124 = (0, import_provider_utils17.createProviderToolFactory)({
4418
+ var computer_20251124 = (0, import_provider_utils18.createProviderToolFactory)({
4291
4419
  id: "anthropic.computer_20251124",
4292
4420
  inputSchema: computer_20251124InputSchema
4293
4421
  });
4294
4422
 
4295
4423
  // src/tool/memory_20250818.ts
4296
- var import_provider_utils18 = require("@ai-sdk/provider-utils");
4297
- var import_v415 = require("zod/v4");
4298
- var memory_20250818InputSchema = (0, import_provider_utils18.lazySchema)(
4299
- () => (0, import_provider_utils18.zodSchema)(
4300
- import_v415.z.discriminatedUnion("command", [
4301
- import_v415.z.object({
4302
- command: import_v415.z.literal("view"),
4303
- path: import_v415.z.string(),
4304
- view_range: import_v415.z.tuple([import_v415.z.number(), import_v415.z.number()]).optional()
4424
+ var import_provider_utils19 = require("@ai-sdk/provider-utils");
4425
+ var import_v416 = require("zod/v4");
4426
+ var memory_20250818InputSchema = (0, import_provider_utils19.lazySchema)(
4427
+ () => (0, import_provider_utils19.zodSchema)(
4428
+ import_v416.z.discriminatedUnion("command", [
4429
+ import_v416.z.object({
4430
+ command: import_v416.z.literal("view"),
4431
+ path: import_v416.z.string(),
4432
+ view_range: import_v416.z.tuple([import_v416.z.number(), import_v416.z.number()]).optional()
4305
4433
  }),
4306
- import_v415.z.object({
4307
- command: import_v415.z.literal("create"),
4308
- path: import_v415.z.string(),
4309
- file_text: import_v415.z.string()
4434
+ import_v416.z.object({
4435
+ command: import_v416.z.literal("create"),
4436
+ path: import_v416.z.string(),
4437
+ file_text: import_v416.z.string()
4310
4438
  }),
4311
- import_v415.z.object({
4312
- command: import_v415.z.literal("str_replace"),
4313
- path: import_v415.z.string(),
4314
- old_str: import_v415.z.string(),
4315
- new_str: import_v415.z.string()
4439
+ import_v416.z.object({
4440
+ command: import_v416.z.literal("str_replace"),
4441
+ path: import_v416.z.string(),
4442
+ old_str: import_v416.z.string(),
4443
+ new_str: import_v416.z.string()
4316
4444
  }),
4317
- import_v415.z.object({
4318
- command: import_v415.z.literal("insert"),
4319
- path: import_v415.z.string(),
4320
- insert_line: import_v415.z.number(),
4321
- insert_text: import_v415.z.string()
4445
+ import_v416.z.object({
4446
+ command: import_v416.z.literal("insert"),
4447
+ path: import_v416.z.string(),
4448
+ insert_line: import_v416.z.number(),
4449
+ insert_text: import_v416.z.string()
4322
4450
  }),
4323
- import_v415.z.object({
4324
- command: import_v415.z.literal("delete"),
4325
- path: import_v415.z.string()
4451
+ import_v416.z.object({
4452
+ command: import_v416.z.literal("delete"),
4453
+ path: import_v416.z.string()
4326
4454
  }),
4327
- import_v415.z.object({
4328
- command: import_v415.z.literal("rename"),
4329
- old_path: import_v415.z.string(),
4330
- new_path: import_v415.z.string()
4455
+ import_v416.z.object({
4456
+ command: import_v416.z.literal("rename"),
4457
+ old_path: import_v416.z.string(),
4458
+ new_path: import_v416.z.string()
4331
4459
  })
4332
4460
  ])
4333
4461
  )
4334
4462
  );
4335
- var memory_20250818 = (0, import_provider_utils18.createProviderToolFactory)({
4463
+ var memory_20250818 = (0, import_provider_utils19.createProviderToolFactory)({
4336
4464
  id: "anthropic.memory_20250818",
4337
4465
  inputSchema: memory_20250818InputSchema
4338
4466
  });
4339
4467
 
4340
4468
  // src/tool/text-editor_20241022.ts
4341
- var import_provider_utils19 = require("@ai-sdk/provider-utils");
4342
- var import_v416 = require("zod/v4");
4343
- var textEditor_20241022InputSchema = (0, import_provider_utils19.lazySchema)(
4344
- () => (0, import_provider_utils19.zodSchema)(
4345
- import_v416.z.object({
4346
- command: import_v416.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4347
- path: import_v416.z.string(),
4348
- file_text: import_v416.z.string().optional(),
4349
- insert_line: import_v416.z.number().int().optional(),
4350
- new_str: import_v416.z.string().optional(),
4351
- insert_text: import_v416.z.string().optional(),
4352
- old_str: import_v416.z.string().optional(),
4353
- view_range: import_v416.z.array(import_v416.z.number().int()).optional()
4354
- })
4355
- )
4356
- );
4357
- var textEditor_20241022 = (0, import_provider_utils19.createProviderToolFactory)({
4358
- id: "anthropic.text_editor_20241022",
4359
- inputSchema: textEditor_20241022InputSchema
4360
- });
4361
-
4362
- // src/tool/text-editor_20250124.ts
4363
4469
  var import_provider_utils20 = require("@ai-sdk/provider-utils");
4364
4470
  var import_v417 = require("zod/v4");
4365
- var textEditor_20250124InputSchema = (0, import_provider_utils20.lazySchema)(
4471
+ var textEditor_20241022InputSchema = (0, import_provider_utils20.lazySchema)(
4366
4472
  () => (0, import_provider_utils20.zodSchema)(
4367
4473
  import_v417.z.object({
4368
4474
  command: import_v417.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
@@ -4376,18 +4482,18 @@ var textEditor_20250124InputSchema = (0, import_provider_utils20.lazySchema)(
4376
4482
  })
4377
4483
  )
4378
4484
  );
4379
- var textEditor_20250124 = (0, import_provider_utils20.createProviderToolFactory)({
4380
- id: "anthropic.text_editor_20250124",
4381
- inputSchema: textEditor_20250124InputSchema
4485
+ var textEditor_20241022 = (0, import_provider_utils20.createProviderToolFactory)({
4486
+ id: "anthropic.text_editor_20241022",
4487
+ inputSchema: textEditor_20241022InputSchema
4382
4488
  });
4383
4489
 
4384
- // src/tool/text-editor_20250429.ts
4490
+ // src/tool/text-editor_20250124.ts
4385
4491
  var import_provider_utils21 = require("@ai-sdk/provider-utils");
4386
4492
  var import_v418 = require("zod/v4");
4387
- var textEditor_20250429InputSchema = (0, import_provider_utils21.lazySchema)(
4493
+ var textEditor_20250124InputSchema = (0, import_provider_utils21.lazySchema)(
4388
4494
  () => (0, import_provider_utils21.zodSchema)(
4389
4495
  import_v418.z.object({
4390
- command: import_v418.z.enum(["view", "create", "str_replace", "insert"]),
4496
+ command: import_v418.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4391
4497
  path: import_v418.z.string(),
4392
4498
  file_text: import_v418.z.string().optional(),
4393
4499
  insert_line: import_v418.z.number().int().optional(),
@@ -4398,47 +4504,69 @@ var textEditor_20250429InputSchema = (0, import_provider_utils21.lazySchema)(
4398
4504
  })
4399
4505
  )
4400
4506
  );
4401
- var textEditor_20250429 = (0, import_provider_utils21.createProviderToolFactory)({
4402
- id: "anthropic.text_editor_20250429",
4403
- inputSchema: textEditor_20250429InputSchema
4507
+ var textEditor_20250124 = (0, import_provider_utils21.createProviderToolFactory)({
4508
+ id: "anthropic.text_editor_20250124",
4509
+ inputSchema: textEditor_20250124InputSchema
4404
4510
  });
4405
4511
 
4406
- // src/tool/tool-search-bm25_20251119.ts
4512
+ // src/tool/text-editor_20250429.ts
4407
4513
  var import_provider_utils22 = require("@ai-sdk/provider-utils");
4408
4514
  var import_v419 = require("zod/v4");
4409
- var toolSearchBm25_20251119OutputSchema = (0, import_provider_utils22.lazySchema)(
4515
+ var textEditor_20250429InputSchema = (0, import_provider_utils22.lazySchema)(
4410
4516
  () => (0, import_provider_utils22.zodSchema)(
4411
- import_v419.z.array(
4412
- import_v419.z.object({
4413
- type: import_v419.z.literal("tool_reference"),
4414
- toolName: import_v419.z.string()
4517
+ import_v419.z.object({
4518
+ command: import_v419.z.enum(["view", "create", "str_replace", "insert"]),
4519
+ path: import_v419.z.string(),
4520
+ file_text: import_v419.z.string().optional(),
4521
+ insert_line: import_v419.z.number().int().optional(),
4522
+ new_str: import_v419.z.string().optional(),
4523
+ insert_text: import_v419.z.string().optional(),
4524
+ old_str: import_v419.z.string().optional(),
4525
+ view_range: import_v419.z.array(import_v419.z.number().int()).optional()
4526
+ })
4527
+ )
4528
+ );
4529
+ var textEditor_20250429 = (0, import_provider_utils22.createProviderToolFactory)({
4530
+ id: "anthropic.text_editor_20250429",
4531
+ inputSchema: textEditor_20250429InputSchema
4532
+ });
4533
+
4534
+ // src/tool/tool-search-bm25_20251119.ts
4535
+ var import_provider_utils23 = require("@ai-sdk/provider-utils");
4536
+ var import_v420 = require("zod/v4");
4537
+ var toolSearchBm25_20251119OutputSchema = (0, import_provider_utils23.lazySchema)(
4538
+ () => (0, import_provider_utils23.zodSchema)(
4539
+ import_v420.z.array(
4540
+ import_v420.z.object({
4541
+ type: import_v420.z.literal("tool_reference"),
4542
+ toolName: import_v420.z.string()
4415
4543
  })
4416
4544
  )
4417
4545
  )
4418
4546
  );
4419
- var toolSearchBm25_20251119InputSchema = (0, import_provider_utils22.lazySchema)(
4420
- () => (0, import_provider_utils22.zodSchema)(
4421
- import_v419.z.object({
4547
+ var toolSearchBm25_20251119InputSchema = (0, import_provider_utils23.lazySchema)(
4548
+ () => (0, import_provider_utils23.zodSchema)(
4549
+ import_v420.z.object({
4422
4550
  /**
4423
4551
  * A natural language query to search for tools.
4424
4552
  * Claude will use BM25 text search to find relevant tools.
4425
4553
  */
4426
- query: import_v419.z.string(),
4554
+ query: import_v420.z.string(),
4427
4555
  /**
4428
4556
  * Maximum number of tools to return. Optional.
4429
4557
  */
4430
- limit: import_v419.z.number().optional()
4558
+ limit: import_v420.z.number().optional()
4431
4559
  })
4432
4560
  )
4433
4561
  );
4434
- var factory7 = (0, import_provider_utils22.createProviderToolFactoryWithOutputSchema)({
4562
+ var factory8 = (0, import_provider_utils23.createProviderToolFactoryWithOutputSchema)({
4435
4563
  id: "anthropic.tool_search_bm25_20251119",
4436
4564
  inputSchema: toolSearchBm25_20251119InputSchema,
4437
4565
  outputSchema: toolSearchBm25_20251119OutputSchema,
4438
4566
  supportsDeferredResults: true
4439
4567
  });
4440
4568
  var toolSearchBm25_20251119 = (args = {}) => {
4441
- return factory7(args);
4569
+ return factory8(args);
4442
4570
  };
4443
4571
 
4444
4572
  // src/anthropic-tools.ts
@@ -4477,6 +4605,19 @@ var anthropicTools = {
4477
4605
  * This is the latest version with enhanced Bash support and file operations.
4478
4606
  */
4479
4607
  codeExecution_20250825,
4608
+ /**
4609
+ * Claude can analyze data, create visualizations, perform complex calculations,
4610
+ * run system commands, create and edit files, and process uploaded files directly within
4611
+ * the API conversation.
4612
+ *
4613
+ * The code execution tool allows Claude to run both Python and Bash commands and manipulate files,
4614
+ * including writing code, in a secure, sandboxed environment.
4615
+ *
4616
+ * This is the recommended version. Does not require a beta header.
4617
+ *
4618
+ * Supported models: Claude Opus 4.6, Sonnet 4.6, Sonnet 4.5, Opus 4.5
4619
+ */
4620
+ codeExecution_20260120,
4480
4621
  /**
4481
4622
  * Claude can interact with computer environments through the computer use tool, which
4482
4623
  * provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.