@ai-sdk/anthropic 3.0.47 → 3.0.49

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.
@@ -102,6 +102,10 @@ var anthropicMessagesResponseSchema = lazySchema2(
102
102
  type: z2.literal("code_execution_20250825"),
103
103
  tool_id: z2.string()
104
104
  }),
105
+ z2.object({
106
+ type: z2.literal("code_execution_20260120"),
107
+ tool_id: z2.string()
108
+ }),
105
109
  z2.object({
106
110
  type: z2.literal("direct")
107
111
  })
@@ -358,6 +362,10 @@ var anthropicMessagesChunkSchema = lazySchema2(
358
362
  type: z2.literal("code_execution_20250825"),
359
363
  tool_id: z2.string()
360
364
  }),
365
+ z2.object({
366
+ type: z2.literal("code_execution_20260120"),
367
+ tool_id: z2.string()
368
+ }),
361
369
  z2.object({
362
370
  type: z2.literal("direct")
363
371
  })
@@ -396,6 +404,10 @@ var anthropicMessagesChunkSchema = lazySchema2(
396
404
  type: z2.literal("code_execution_20250825"),
397
405
  tool_id: z2.string()
398
406
  }),
407
+ z2.object({
408
+ type: z2.literal("code_execution_20260120"),
409
+ tool_id: z2.string()
410
+ }),
399
411
  z2.object({
400
412
  type: z2.literal("direct")
401
413
  })
@@ -756,7 +768,7 @@ var anthropicLanguageModelOptions = z3.object({
756
768
  /**
757
769
  * Determines how structured outputs are generated.
758
770
  *
759
- * - `outputFormat`: Use the `output_format` parameter to specify the structured output format.
771
+ * - `outputFormat`: Use the `output_config.format` parameter to specify the structured output format.
760
772
  * - `jsonTool`: Use a special 'json' tool to specify the structured output format.
761
773
  * - `auto`: Use 'outputFormat' when supported, otherwise use 'jsonTool' (default).
762
774
  */
@@ -1155,6 +1167,13 @@ async function prepareTools({
1155
1167
  });
1156
1168
  break;
1157
1169
  }
1170
+ case "anthropic.code_execution_20260120": {
1171
+ anthropicTools2.push({
1172
+ type: "code_execution_20260120",
1173
+ name: "code_execution"
1174
+ });
1175
+ break;
1176
+ }
1158
1177
  case "anthropic.computer_20250124": {
1159
1178
  betas.add("computer-use-2025-01-24");
1160
1179
  anthropicTools2.push({
@@ -2101,8 +2120,8 @@ async function convertToAnthropicMessagesPrompt({
2101
2120
  break;
2102
2121
  }
2103
2122
  const callerOptions = (_l = part.providerOptions) == null ? void 0 : _l.anthropic;
2104
- const caller = (callerOptions == null ? void 0 : callerOptions.caller) ? callerOptions.caller.type === "code_execution_20250825" && callerOptions.caller.toolId ? {
2105
- type: "code_execution_20250825",
2123
+ const caller = (callerOptions == null ? void 0 : callerOptions.caller) ? (callerOptions.caller.type === "code_execution_20250825" || callerOptions.caller.type === "code_execution_20260120") && callerOptions.caller.toolId ? {
2124
+ type: callerOptions.caller.type,
2106
2125
  tool_id: callerOptions.caller.toolId
2107
2126
  } : callerOptions.caller.type === "direct" ? { type: "direct" } : void 0 : void 0;
2108
2127
  anthropicContent.push({
@@ -2608,6 +2627,7 @@ var AnthropicMessagesLanguageModel = class {
2608
2627
  providerToolNames: {
2609
2628
  "anthropic.code_execution_20250522": "code_execution",
2610
2629
  "anthropic.code_execution_20250825": "code_execution",
2630
+ "anthropic.code_execution_20260120": "code_execution",
2611
2631
  "anthropic.computer_20241022": "computer",
2612
2632
  "anthropic.computer_20250124": "computer",
2613
2633
  "anthropic.text_editor_20241022": "str_replace_editor",
@@ -2650,8 +2670,18 @@ var AnthropicMessagesLanguageModel = class {
2650
2670
  ...thinkingBudget != null && { budget_tokens: thinkingBudget }
2651
2671
  }
2652
2672
  },
2653
- ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
2654
- output_config: { effort: anthropicOptions.effort }
2673
+ ...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
2674
+ output_config: {
2675
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
2676
+ effort: anthropicOptions.effort
2677
+ },
2678
+ ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
2679
+ format: {
2680
+ type: "json_schema",
2681
+ schema: responseFormat.schema
2682
+ }
2683
+ }
2684
+ }
2655
2685
  },
2656
2686
  ...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
2657
2687
  speed: anthropicOptions.speed
@@ -2659,13 +2689,6 @@ var AnthropicMessagesLanguageModel = class {
2659
2689
  ...(anthropicOptions == null ? void 0 : anthropicOptions.cacheControl) && {
2660
2690
  cache_control: anthropicOptions.cacheControl
2661
2691
  },
2662
- // structured output:
2663
- ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
2664
- output_format: {
2665
- type: "json_schema",
2666
- schema: responseFormat.schema
2667
- }
2668
- },
2669
2692
  // mcp servers:
2670
2693
  ...(anthropicOptions == null ? void 0 : anthropicOptions.mcpServers) && anthropicOptions.mcpServers.length > 0 && {
2671
2694
  mcp_servers: anthropicOptions.mcpServers.map((server) => ({
@@ -2822,7 +2845,7 @@ var AnthropicMessagesLanguageModel = class {
2822
2845
  betas.add("skills-2025-10-02");
2823
2846
  betas.add("files-api-2025-04-14");
2824
2847
  if (!(tools == null ? void 0 : tools.some(
2825
- (tool) => tool.type === "provider" && tool.id === "anthropic.code_execution_20250825"
2848
+ (tool) => tool.type === "provider" && (tool.id === "anthropic.code_execution_20250825" || tool.id === "anthropic.code_execution_20260120")
2826
2849
  ))) {
2827
2850
  warnings.push({
2828
2851
  type: "other",
@@ -2839,10 +2862,6 @@ var AnthropicMessagesLanguageModel = class {
2839
2862
  if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
2840
2863
  betas.add("fine-grained-tool-streaming-2025-05-14");
2841
2864
  }
2842
- const usingNativeOutputFormat = useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null;
2843
- if (usingNativeOutputFormat) {
2844
- betas.add("structured-outputs-2025-11-13");
2845
- }
2846
2865
  const {
2847
2866
  tools: anthropicTools2,
2848
2867
  toolChoice: anthropicToolChoice,
@@ -4208,17 +4227,126 @@ var bash_20250124 = createProviderToolFactory3({
4208
4227
  inputSchema: bash_20250124InputSchema
4209
4228
  });
4210
4229
 
4211
- // src/tool/computer_20241022.ts
4230
+ // src/tool/code-execution_20260120.ts
4212
4231
  import {
4213
- createProviderToolFactory as createProviderToolFactory4,
4232
+ createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,
4214
4233
  lazySchema as lazySchema11,
4215
4234
  zodSchema as zodSchema11
4216
4235
  } from "@ai-sdk/provider-utils";
4217
4236
  import { z as z12 } from "zod/v4";
4218
- var computer_20241022InputSchema = lazySchema11(
4237
+ var codeExecution_20260120OutputSchema = lazySchema11(
4219
4238
  () => zodSchema11(
4220
- z12.object({
4221
- action: z12.enum([
4239
+ z12.discriminatedUnion("type", [
4240
+ z12.object({
4241
+ type: z12.literal("code_execution_result"),
4242
+ stdout: z12.string(),
4243
+ stderr: z12.string(),
4244
+ return_code: z12.number(),
4245
+ content: z12.array(
4246
+ z12.object({
4247
+ type: z12.literal("code_execution_output"),
4248
+ file_id: z12.string()
4249
+ })
4250
+ ).optional().default([])
4251
+ }),
4252
+ z12.object({
4253
+ type: z12.literal("bash_code_execution_result"),
4254
+ content: z12.array(
4255
+ z12.object({
4256
+ type: z12.literal("bash_code_execution_output"),
4257
+ file_id: z12.string()
4258
+ })
4259
+ ),
4260
+ stdout: z12.string(),
4261
+ stderr: z12.string(),
4262
+ return_code: z12.number()
4263
+ }),
4264
+ z12.object({
4265
+ type: z12.literal("bash_code_execution_tool_result_error"),
4266
+ error_code: z12.string()
4267
+ }),
4268
+ z12.object({
4269
+ type: z12.literal("text_editor_code_execution_tool_result_error"),
4270
+ error_code: z12.string()
4271
+ }),
4272
+ z12.object({
4273
+ type: z12.literal("text_editor_code_execution_view_result"),
4274
+ content: z12.string(),
4275
+ file_type: z12.string(),
4276
+ num_lines: z12.number().nullable(),
4277
+ start_line: z12.number().nullable(),
4278
+ total_lines: z12.number().nullable()
4279
+ }),
4280
+ z12.object({
4281
+ type: z12.literal("text_editor_code_execution_create_result"),
4282
+ is_file_update: z12.boolean()
4283
+ }),
4284
+ z12.object({
4285
+ type: z12.literal("text_editor_code_execution_str_replace_result"),
4286
+ lines: z12.array(z12.string()).nullable(),
4287
+ new_lines: z12.number().nullable(),
4288
+ new_start: z12.number().nullable(),
4289
+ old_lines: z12.number().nullable(),
4290
+ old_start: z12.number().nullable()
4291
+ })
4292
+ ])
4293
+ )
4294
+ );
4295
+ var codeExecution_20260120InputSchema = lazySchema11(
4296
+ () => zodSchema11(
4297
+ z12.discriminatedUnion("type", [
4298
+ z12.object({
4299
+ type: z12.literal("programmatic-tool-call"),
4300
+ code: z12.string()
4301
+ }),
4302
+ z12.object({
4303
+ type: z12.literal("bash_code_execution"),
4304
+ command: z12.string()
4305
+ }),
4306
+ z12.discriminatedUnion("command", [
4307
+ z12.object({
4308
+ type: z12.literal("text_editor_code_execution"),
4309
+ command: z12.literal("view"),
4310
+ path: z12.string()
4311
+ }),
4312
+ z12.object({
4313
+ type: z12.literal("text_editor_code_execution"),
4314
+ command: z12.literal("create"),
4315
+ path: z12.string(),
4316
+ file_text: z12.string().nullish()
4317
+ }),
4318
+ z12.object({
4319
+ type: z12.literal("text_editor_code_execution"),
4320
+ command: z12.literal("str_replace"),
4321
+ path: z12.string(),
4322
+ old_str: z12.string(),
4323
+ new_str: z12.string()
4324
+ })
4325
+ ])
4326
+ ])
4327
+ )
4328
+ );
4329
+ var factory7 = createProviderToolFactoryWithOutputSchema6({
4330
+ id: "anthropic.code_execution_20260120",
4331
+ inputSchema: codeExecution_20260120InputSchema,
4332
+ outputSchema: codeExecution_20260120OutputSchema,
4333
+ supportsDeferredResults: true
4334
+ });
4335
+ var codeExecution_20260120 = (args = {}) => {
4336
+ return factory7(args);
4337
+ };
4338
+
4339
+ // src/tool/computer_20241022.ts
4340
+ import {
4341
+ createProviderToolFactory as createProviderToolFactory4,
4342
+ lazySchema as lazySchema12,
4343
+ zodSchema as zodSchema12
4344
+ } from "@ai-sdk/provider-utils";
4345
+ import { z as z13 } from "zod/v4";
4346
+ var computer_20241022InputSchema = lazySchema12(
4347
+ () => zodSchema12(
4348
+ z13.object({
4349
+ action: z13.enum([
4222
4350
  "key",
4223
4351
  "type",
4224
4352
  "mouse_move",
@@ -4230,8 +4358,8 @@ var computer_20241022InputSchema = lazySchema11(
4230
4358
  "screenshot",
4231
4359
  "cursor_position"
4232
4360
  ]),
4233
- coordinate: z12.array(z12.number().int()).optional(),
4234
- text: z12.string().optional()
4361
+ coordinate: z13.array(z13.number().int()).optional(),
4362
+ text: z13.string().optional()
4235
4363
  })
4236
4364
  )
4237
4365
  );
@@ -4243,14 +4371,14 @@ var computer_20241022 = createProviderToolFactory4({
4243
4371
  // src/tool/computer_20250124.ts
4244
4372
  import {
4245
4373
  createProviderToolFactory as createProviderToolFactory5,
4246
- lazySchema as lazySchema12,
4247
- zodSchema as zodSchema12
4374
+ lazySchema as lazySchema13,
4375
+ zodSchema as zodSchema13
4248
4376
  } from "@ai-sdk/provider-utils";
4249
- import { z as z13 } from "zod/v4";
4250
- var computer_20250124InputSchema = lazySchema12(
4251
- () => zodSchema12(
4252
- z13.object({
4253
- action: z13.enum([
4377
+ import { z as z14 } from "zod/v4";
4378
+ var computer_20250124InputSchema = lazySchema13(
4379
+ () => zodSchema13(
4380
+ z14.object({
4381
+ action: z14.enum([
4254
4382
  "key",
4255
4383
  "hold_key",
4256
4384
  "type",
@@ -4268,12 +4396,12 @@ var computer_20250124InputSchema = lazySchema12(
4268
4396
  "wait",
4269
4397
  "screenshot"
4270
4398
  ]),
4271
- coordinate: z13.tuple([z13.number().int(), z13.number().int()]).optional(),
4272
- duration: z13.number().optional(),
4273
- scroll_amount: z13.number().optional(),
4274
- scroll_direction: z13.enum(["up", "down", "left", "right"]).optional(),
4275
- start_coordinate: z13.tuple([z13.number().int(), z13.number().int()]).optional(),
4276
- text: z13.string().optional()
4399
+ coordinate: z14.tuple([z14.number().int(), z14.number().int()]).optional(),
4400
+ duration: z14.number().optional(),
4401
+ scroll_amount: z14.number().optional(),
4402
+ scroll_direction: z14.enum(["up", "down", "left", "right"]).optional(),
4403
+ start_coordinate: z14.tuple([z14.number().int(), z14.number().int()]).optional(),
4404
+ text: z14.string().optional()
4277
4405
  })
4278
4406
  )
4279
4407
  );
@@ -4285,14 +4413,14 @@ var computer_20250124 = createProviderToolFactory5({
4285
4413
  // src/tool/computer_20251124.ts
4286
4414
  import {
4287
4415
  createProviderToolFactory as createProviderToolFactory6,
4288
- lazySchema as lazySchema13,
4289
- zodSchema as zodSchema13
4416
+ lazySchema as lazySchema14,
4417
+ zodSchema as zodSchema14
4290
4418
  } from "@ai-sdk/provider-utils";
4291
- import { z as z14 } from "zod/v4";
4292
- var computer_20251124InputSchema = lazySchema13(
4293
- () => zodSchema13(
4294
- z14.object({
4295
- action: z14.enum([
4419
+ import { z as z15 } from "zod/v4";
4420
+ var computer_20251124InputSchema = lazySchema14(
4421
+ () => zodSchema14(
4422
+ z15.object({
4423
+ action: z15.enum([
4296
4424
  "key",
4297
4425
  "hold_key",
4298
4426
  "type",
@@ -4311,18 +4439,18 @@ var computer_20251124InputSchema = lazySchema13(
4311
4439
  "screenshot",
4312
4440
  "zoom"
4313
4441
  ]),
4314
- coordinate: z14.tuple([z14.number().int(), z14.number().int()]).optional(),
4315
- duration: z14.number().optional(),
4316
- region: z14.tuple([
4317
- z14.number().int(),
4318
- z14.number().int(),
4319
- z14.number().int(),
4320
- z14.number().int()
4442
+ coordinate: z15.tuple([z15.number().int(), z15.number().int()]).optional(),
4443
+ duration: z15.number().optional(),
4444
+ region: z15.tuple([
4445
+ z15.number().int(),
4446
+ z15.number().int(),
4447
+ z15.number().int(),
4448
+ z15.number().int()
4321
4449
  ]).optional(),
4322
- scroll_amount: z14.number().optional(),
4323
- scroll_direction: z14.enum(["up", "down", "left", "right"]).optional(),
4324
- start_coordinate: z14.tuple([z14.number().int(), z14.number().int()]).optional(),
4325
- text: z14.string().optional()
4450
+ scroll_amount: z15.number().optional(),
4451
+ scroll_direction: z15.enum(["up", "down", "left", "right"]).optional(),
4452
+ start_coordinate: z15.tuple([z15.number().int(), z15.number().int()]).optional(),
4453
+ text: z15.string().optional()
4326
4454
  })
4327
4455
  )
4328
4456
  );
@@ -4334,43 +4462,43 @@ var computer_20251124 = createProviderToolFactory6({
4334
4462
  // src/tool/memory_20250818.ts
4335
4463
  import {
4336
4464
  createProviderToolFactory as createProviderToolFactory7,
4337
- lazySchema as lazySchema14,
4338
- zodSchema as zodSchema14
4465
+ lazySchema as lazySchema15,
4466
+ zodSchema as zodSchema15
4339
4467
  } from "@ai-sdk/provider-utils";
4340
- import { z as z15 } from "zod/v4";
4341
- var memory_20250818InputSchema = lazySchema14(
4342
- () => zodSchema14(
4343
- z15.discriminatedUnion("command", [
4344
- z15.object({
4345
- command: z15.literal("view"),
4346
- path: z15.string(),
4347
- view_range: z15.tuple([z15.number(), z15.number()]).optional()
4468
+ import { z as z16 } from "zod/v4";
4469
+ var memory_20250818InputSchema = lazySchema15(
4470
+ () => zodSchema15(
4471
+ z16.discriminatedUnion("command", [
4472
+ z16.object({
4473
+ command: z16.literal("view"),
4474
+ path: z16.string(),
4475
+ view_range: z16.tuple([z16.number(), z16.number()]).optional()
4348
4476
  }),
4349
- z15.object({
4350
- command: z15.literal("create"),
4351
- path: z15.string(),
4352
- file_text: z15.string()
4477
+ z16.object({
4478
+ command: z16.literal("create"),
4479
+ path: z16.string(),
4480
+ file_text: z16.string()
4353
4481
  }),
4354
- z15.object({
4355
- command: z15.literal("str_replace"),
4356
- path: z15.string(),
4357
- old_str: z15.string(),
4358
- new_str: z15.string()
4482
+ z16.object({
4483
+ command: z16.literal("str_replace"),
4484
+ path: z16.string(),
4485
+ old_str: z16.string(),
4486
+ new_str: z16.string()
4359
4487
  }),
4360
- z15.object({
4361
- command: z15.literal("insert"),
4362
- path: z15.string(),
4363
- insert_line: z15.number(),
4364
- insert_text: z15.string()
4488
+ z16.object({
4489
+ command: z16.literal("insert"),
4490
+ path: z16.string(),
4491
+ insert_line: z16.number(),
4492
+ insert_text: z16.string()
4365
4493
  }),
4366
- z15.object({
4367
- command: z15.literal("delete"),
4368
- path: z15.string()
4494
+ z16.object({
4495
+ command: z16.literal("delete"),
4496
+ path: z16.string()
4369
4497
  }),
4370
- z15.object({
4371
- command: z15.literal("rename"),
4372
- old_path: z15.string(),
4373
- new_path: z15.string()
4498
+ z16.object({
4499
+ command: z16.literal("rename"),
4500
+ old_path: z16.string(),
4501
+ new_path: z16.string()
4374
4502
  })
4375
4503
  ])
4376
4504
  )
@@ -4383,37 +4511,11 @@ var memory_20250818 = createProviderToolFactory7({
4383
4511
  // src/tool/text-editor_20241022.ts
4384
4512
  import {
4385
4513
  createProviderToolFactory as createProviderToolFactory8,
4386
- lazySchema as lazySchema15,
4387
- zodSchema as zodSchema15
4388
- } from "@ai-sdk/provider-utils";
4389
- import { z as z16 } from "zod/v4";
4390
- var textEditor_20241022InputSchema = lazySchema15(
4391
- () => zodSchema15(
4392
- z16.object({
4393
- command: z16.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4394
- path: z16.string(),
4395
- file_text: z16.string().optional(),
4396
- insert_line: z16.number().int().optional(),
4397
- new_str: z16.string().optional(),
4398
- insert_text: z16.string().optional(),
4399
- old_str: z16.string().optional(),
4400
- view_range: z16.array(z16.number().int()).optional()
4401
- })
4402
- )
4403
- );
4404
- var textEditor_20241022 = createProviderToolFactory8({
4405
- id: "anthropic.text_editor_20241022",
4406
- inputSchema: textEditor_20241022InputSchema
4407
- });
4408
-
4409
- // src/tool/text-editor_20250124.ts
4410
- import {
4411
- createProviderToolFactory as createProviderToolFactory9,
4412
4514
  lazySchema as lazySchema16,
4413
4515
  zodSchema as zodSchema16
4414
4516
  } from "@ai-sdk/provider-utils";
4415
4517
  import { z as z17 } from "zod/v4";
4416
- var textEditor_20250124InputSchema = lazySchema16(
4518
+ var textEditor_20241022InputSchema = lazySchema16(
4417
4519
  () => zodSchema16(
4418
4520
  z17.object({
4419
4521
  command: z17.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
@@ -4427,22 +4529,22 @@ var textEditor_20250124InputSchema = lazySchema16(
4427
4529
  })
4428
4530
  )
4429
4531
  );
4430
- var textEditor_20250124 = createProviderToolFactory9({
4431
- id: "anthropic.text_editor_20250124",
4432
- inputSchema: textEditor_20250124InputSchema
4532
+ var textEditor_20241022 = createProviderToolFactory8({
4533
+ id: "anthropic.text_editor_20241022",
4534
+ inputSchema: textEditor_20241022InputSchema
4433
4535
  });
4434
4536
 
4435
- // src/tool/text-editor_20250429.ts
4537
+ // src/tool/text-editor_20250124.ts
4436
4538
  import {
4437
- createProviderToolFactory as createProviderToolFactory10,
4539
+ createProviderToolFactory as createProviderToolFactory9,
4438
4540
  lazySchema as lazySchema17,
4439
4541
  zodSchema as zodSchema17
4440
4542
  } from "@ai-sdk/provider-utils";
4441
4543
  import { z as z18 } from "zod/v4";
4442
- var textEditor_20250429InputSchema = lazySchema17(
4544
+ var textEditor_20250124InputSchema = lazySchema17(
4443
4545
  () => zodSchema17(
4444
4546
  z18.object({
4445
- command: z18.enum(["view", "create", "str_replace", "insert"]),
4547
+ command: z18.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4446
4548
  path: z18.string(),
4447
4549
  file_text: z18.string().optional(),
4448
4550
  insert_line: z18.number().int().optional(),
@@ -4453,51 +4555,77 @@ var textEditor_20250429InputSchema = lazySchema17(
4453
4555
  })
4454
4556
  )
4455
4557
  );
4456
- var textEditor_20250429 = createProviderToolFactory10({
4457
- id: "anthropic.text_editor_20250429",
4458
- inputSchema: textEditor_20250429InputSchema
4558
+ var textEditor_20250124 = createProviderToolFactory9({
4559
+ id: "anthropic.text_editor_20250124",
4560
+ inputSchema: textEditor_20250124InputSchema
4459
4561
  });
4460
4562
 
4461
- // src/tool/tool-search-bm25_20251119.ts
4563
+ // src/tool/text-editor_20250429.ts
4462
4564
  import {
4463
- createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,
4565
+ createProviderToolFactory as createProviderToolFactory10,
4464
4566
  lazySchema as lazySchema18,
4465
4567
  zodSchema as zodSchema18
4466
4568
  } from "@ai-sdk/provider-utils";
4467
4569
  import { z as z19 } from "zod/v4";
4468
- var toolSearchBm25_20251119OutputSchema = lazySchema18(
4570
+ var textEditor_20250429InputSchema = lazySchema18(
4469
4571
  () => zodSchema18(
4470
- z19.array(
4471
- z19.object({
4472
- type: z19.literal("tool_reference"),
4473
- toolName: z19.string()
4572
+ z19.object({
4573
+ command: z19.enum(["view", "create", "str_replace", "insert"]),
4574
+ path: z19.string(),
4575
+ file_text: z19.string().optional(),
4576
+ insert_line: z19.number().int().optional(),
4577
+ new_str: z19.string().optional(),
4578
+ insert_text: z19.string().optional(),
4579
+ old_str: z19.string().optional(),
4580
+ view_range: z19.array(z19.number().int()).optional()
4581
+ })
4582
+ )
4583
+ );
4584
+ var textEditor_20250429 = createProviderToolFactory10({
4585
+ id: "anthropic.text_editor_20250429",
4586
+ inputSchema: textEditor_20250429InputSchema
4587
+ });
4588
+
4589
+ // src/tool/tool-search-bm25_20251119.ts
4590
+ import {
4591
+ createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema7,
4592
+ lazySchema as lazySchema19,
4593
+ zodSchema as zodSchema19
4594
+ } from "@ai-sdk/provider-utils";
4595
+ import { z as z20 } from "zod/v4";
4596
+ var toolSearchBm25_20251119OutputSchema = lazySchema19(
4597
+ () => zodSchema19(
4598
+ z20.array(
4599
+ z20.object({
4600
+ type: z20.literal("tool_reference"),
4601
+ toolName: z20.string()
4474
4602
  })
4475
4603
  )
4476
4604
  )
4477
4605
  );
4478
- var toolSearchBm25_20251119InputSchema = lazySchema18(
4479
- () => zodSchema18(
4480
- z19.object({
4606
+ var toolSearchBm25_20251119InputSchema = lazySchema19(
4607
+ () => zodSchema19(
4608
+ z20.object({
4481
4609
  /**
4482
4610
  * A natural language query to search for tools.
4483
4611
  * Claude will use BM25 text search to find relevant tools.
4484
4612
  */
4485
- query: z19.string(),
4613
+ query: z20.string(),
4486
4614
  /**
4487
4615
  * Maximum number of tools to return. Optional.
4488
4616
  */
4489
- limit: z19.number().optional()
4617
+ limit: z20.number().optional()
4490
4618
  })
4491
4619
  )
4492
4620
  );
4493
- var factory7 = createProviderToolFactoryWithOutputSchema6({
4621
+ var factory8 = createProviderToolFactoryWithOutputSchema7({
4494
4622
  id: "anthropic.tool_search_bm25_20251119",
4495
4623
  inputSchema: toolSearchBm25_20251119InputSchema,
4496
4624
  outputSchema: toolSearchBm25_20251119OutputSchema,
4497
4625
  supportsDeferredResults: true
4498
4626
  });
4499
4627
  var toolSearchBm25_20251119 = (args = {}) => {
4500
- return factory7(args);
4628
+ return factory8(args);
4501
4629
  };
4502
4630
 
4503
4631
  // src/anthropic-tools.ts
@@ -4536,6 +4664,19 @@ var anthropicTools = {
4536
4664
  * This is the latest version with enhanced Bash support and file operations.
4537
4665
  */
4538
4666
  codeExecution_20250825,
4667
+ /**
4668
+ * Claude can analyze data, create visualizations, perform complex calculations,
4669
+ * run system commands, create and edit files, and process uploaded files directly within
4670
+ * the API conversation.
4671
+ *
4672
+ * The code execution tool allows Claude to run both Python and Bash commands and manipulate files,
4673
+ * including writing code, in a secure, sandboxed environment.
4674
+ *
4675
+ * This is the recommended version. Does not require a beta header.
4676
+ *
4677
+ * Supported models: Claude Opus 4.6, Sonnet 4.6, Sonnet 4.5, Opus 4.5
4678
+ */
4679
+ codeExecution_20260120,
4539
4680
  /**
4540
4681
  * Claude can interact with computer environments through the computer use tool, which
4541
4682
  * provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.