@ai-sdk/anthropic 3.0.0-beta.70 → 3.0.0-beta.72

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.
@@ -847,7 +847,8 @@ async function prepareTools({
847
847
  tools,
848
848
  toolChoice,
849
849
  disableParallelToolUse,
850
- cacheControlValidator
850
+ cacheControlValidator,
851
+ supportsStructuredOutput
851
852
  }) {
852
853
  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
853
854
  const toolWarnings = [];
@@ -868,7 +869,8 @@ async function prepareTools({
868
869
  name: tool.name,
869
870
  description: tool.description,
870
871
  input_schema: tool.inputSchema,
871
- cache_control: cacheControl
872
+ cache_control: cacheControl,
873
+ ...supportsStructuredOutput === true && tool.strict != null ? { strict: tool.strict } : {}
872
874
  });
873
875
  break;
874
876
  }
@@ -2145,12 +2147,14 @@ var AnthropicMessagesLanguageModel = class {
2145
2147
  tools: [...tools != null ? tools : [], jsonResponseTool],
2146
2148
  toolChoice: { type: "required" },
2147
2149
  disableParallelToolUse: true,
2148
- cacheControlValidator
2150
+ cacheControlValidator,
2151
+ supportsStructuredOutput
2149
2152
  } : {
2150
2153
  tools: tools != null ? tools : [],
2151
2154
  toolChoice,
2152
2155
  disableParallelToolUse: anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse,
2153
- cacheControlValidator
2156
+ cacheControlValidator,
2157
+ supportsStructuredOutput
2154
2158
  }
2155
2159
  );
2156
2160
  const cacheWarnings = cacheControlValidator.getWarnings();
@@ -3347,8 +3351,6 @@ var anthropicTools = {
3347
3351
  * allowing system operations, script execution, and command-line automation.
3348
3352
  *
3349
3353
  * Image results are supported.
3350
- *
3351
- * Tool name must be `bash`.
3352
3354
  */
3353
3355
  bash_20241022,
3354
3356
  /**
@@ -3356,8 +3358,6 @@ var anthropicTools = {
3356
3358
  * allowing system operations, script execution, and command-line automation.
3357
3359
  *
3358
3360
  * Image results are supported.
3359
- *
3360
- * Tool name must be `bash`.
3361
3361
  */
3362
3362
  bash_20250124,
3363
3363
  /**
@@ -3367,8 +3367,6 @@ var anthropicTools = {
3367
3367
  *
3368
3368
  * The code execution tool allows Claude to run Bash commands and manipulate files,
3369
3369
  * including writing code, in a secure, sandboxed environment.
3370
- *
3371
- * Tool name must be `code_execution`.
3372
3370
  */
3373
3371
  codeExecution_20250522,
3374
3372
  /**
@@ -3380,8 +3378,6 @@ var anthropicTools = {
3380
3378
  * including writing code, in a secure, sandboxed environment.
3381
3379
  *
3382
3380
  * This is the latest version with enhanced Bash support and file operations.
3383
- *
3384
- * Tool name must be `code_execution`.
3385
3381
  */
3386
3382
  codeExecution_20250825,
3387
3383
  /**
@@ -3390,8 +3386,6 @@ var anthropicTools = {
3390
3386
  *
3391
3387
  * Image results are supported.
3392
3388
  *
3393
- * Tool name must be `computer`.
3394
- *
3395
3389
  * @param displayWidthPx - The width of the display being controlled by the model in pixels.
3396
3390
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
3397
3391
  * @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
@@ -3403,8 +3397,6 @@ var anthropicTools = {
3403
3397
  *
3404
3398
  * Image results are supported.
3405
3399
  *
3406
- * Tool name must be `computer`.
3407
- *
3408
3400
  * @param displayWidthPx - The width of the display being controlled by the model in pixels.
3409
3401
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
3410
3402
  * @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
@@ -3417,8 +3409,6 @@ var anthropicTools = {
3417
3409
  * The memory tool operates client-side—you control where and how the data is stored through your own infrastructure.
3418
3410
  *
3419
3411
  * Supported models: Claude Sonnet 4.5, Claude Sonnet 4, Claude Opus 4.1, Claude Opus 4.
3420
- *
3421
- * Tool name must be `memory`.
3422
3412
  */
3423
3413
  memory_20250818,
3424
3414
  /**
@@ -3427,8 +3417,6 @@ var anthropicTools = {
3427
3417
  * to directly interact with your files, providing hands-on assistance rather than just suggesting changes.
3428
3418
  *
3429
3419
  * Supported models: Claude Sonnet 3.5
3430
- *
3431
- * Tool name must be `str_replace_editor`.
3432
3420
  */
3433
3421
  textEditor_20241022,
3434
3422
  /**
@@ -3437,8 +3425,6 @@ var anthropicTools = {
3437
3425
  * to directly interact with your files, providing hands-on assistance rather than just suggesting changes.
3438
3426
  *
3439
3427
  * Supported models: Claude Sonnet 3.7
3440
- *
3441
- * Tool name must be `str_replace_editor`.
3442
3428
  */
3443
3429
  textEditor_20250124,
3444
3430
  /**
@@ -3448,8 +3434,6 @@ var anthropicTools = {
3448
3434
  *
3449
3435
  * Note: This version does not support the "undo_edit" command.
3450
3436
  *
3451
- * Tool name must be `str_replace_based_edit_tool`.
3452
- *
3453
3437
  * @deprecated Use textEditor_20250728 instead
3454
3438
  */
3455
3439
  textEditor_20250429,
@@ -3462,16 +3446,12 @@ var anthropicTools = {
3462
3446
  *
3463
3447
  * Supported models: Claude Sonnet 4, Opus 4, and Opus 4.1
3464
3448
  *
3465
- * Tool name must be `str_replace_based_edit_tool`.
3466
- *
3467
3449
  * @param maxCharacters - Optional maximum number of characters to view in the file
3468
3450
  */
3469
3451
  textEditor_20250728,
3470
3452
  /**
3471
3453
  * Creates a web fetch tool that gives Claude direct access to real-time web content.
3472
3454
  *
3473
- * Tool name must be `web_fetch`.
3474
- *
3475
3455
  * @param maxUses - The max_uses parameter limits the number of web fetches performed
3476
3456
  * @param allowedDomains - Only fetch from these domains
3477
3457
  * @param blockedDomains - Never fetch from these domains
@@ -3482,8 +3462,6 @@ var anthropicTools = {
3482
3462
  /**
3483
3463
  * Creates a web search tool that gives Claude direct access to real-time web content.
3484
3464
  *
3485
- * Tool name must be `web_search`.
3486
- *
3487
3465
  * @param maxUses - Maximum number of web searches Claude can perform during the conversation.
3488
3466
  * @param allowedDomains - Optional list of domains that Claude is allowed to search.
3489
3467
  * @param blockedDomains - Optional list of domains that Claude should avoid when searching.