@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.
- package/CHANGELOG.md +15 -0
- package/dist/index.d.mts +0 -26
- package/dist/index.d.ts +0 -26
- package/dist/index.js +9 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -31
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +6 -27
- package/dist/internal/index.d.ts +6 -27
- package/dist/internal/index.js +8 -30
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +8 -30
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@ai-sdk/provider-utils";
|
|
12
12
|
|
|
13
13
|
// src/version.ts
|
|
14
|
-
var VERSION = true ? "3.0.0-beta.
|
|
14
|
+
var VERSION = true ? "3.0.0-beta.72" : "0.0.0-test";
|
|
15
15
|
|
|
16
16
|
// src/anthropic-messages-language-model.ts
|
|
17
17
|
import {
|
|
@@ -862,7 +862,8 @@ async function prepareTools({
|
|
|
862
862
|
tools,
|
|
863
863
|
toolChoice,
|
|
864
864
|
disableParallelToolUse,
|
|
865
|
-
cacheControlValidator
|
|
865
|
+
cacheControlValidator,
|
|
866
|
+
supportsStructuredOutput
|
|
866
867
|
}) {
|
|
867
868
|
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
868
869
|
const toolWarnings = [];
|
|
@@ -883,7 +884,8 @@ async function prepareTools({
|
|
|
883
884
|
name: tool.name,
|
|
884
885
|
description: tool.description,
|
|
885
886
|
input_schema: tool.inputSchema,
|
|
886
|
-
cache_control: cacheControl
|
|
887
|
+
cache_control: cacheControl,
|
|
888
|
+
...supportsStructuredOutput === true && tool.strict != null ? { strict: tool.strict } : {}
|
|
887
889
|
});
|
|
888
890
|
break;
|
|
889
891
|
}
|
|
@@ -2160,12 +2162,14 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2160
2162
|
tools: [...tools != null ? tools : [], jsonResponseTool],
|
|
2161
2163
|
toolChoice: { type: "required" },
|
|
2162
2164
|
disableParallelToolUse: true,
|
|
2163
|
-
cacheControlValidator
|
|
2165
|
+
cacheControlValidator,
|
|
2166
|
+
supportsStructuredOutput
|
|
2164
2167
|
} : {
|
|
2165
2168
|
tools: tools != null ? tools : [],
|
|
2166
2169
|
toolChoice,
|
|
2167
2170
|
disableParallelToolUse: anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse,
|
|
2168
|
-
cacheControlValidator
|
|
2171
|
+
cacheControlValidator,
|
|
2172
|
+
supportsStructuredOutput
|
|
2169
2173
|
}
|
|
2170
2174
|
);
|
|
2171
2175
|
const cacheWarnings = cacheControlValidator.getWarnings();
|
|
@@ -3362,8 +3366,6 @@ var anthropicTools = {
|
|
|
3362
3366
|
* allowing system operations, script execution, and command-line automation.
|
|
3363
3367
|
*
|
|
3364
3368
|
* Image results are supported.
|
|
3365
|
-
*
|
|
3366
|
-
* Tool name must be `bash`.
|
|
3367
3369
|
*/
|
|
3368
3370
|
bash_20241022,
|
|
3369
3371
|
/**
|
|
@@ -3371,8 +3373,6 @@ var anthropicTools = {
|
|
|
3371
3373
|
* allowing system operations, script execution, and command-line automation.
|
|
3372
3374
|
*
|
|
3373
3375
|
* Image results are supported.
|
|
3374
|
-
*
|
|
3375
|
-
* Tool name must be `bash`.
|
|
3376
3376
|
*/
|
|
3377
3377
|
bash_20250124,
|
|
3378
3378
|
/**
|
|
@@ -3382,8 +3382,6 @@ var anthropicTools = {
|
|
|
3382
3382
|
*
|
|
3383
3383
|
* The code execution tool allows Claude to run Bash commands and manipulate files,
|
|
3384
3384
|
* including writing code, in a secure, sandboxed environment.
|
|
3385
|
-
*
|
|
3386
|
-
* Tool name must be `code_execution`.
|
|
3387
3385
|
*/
|
|
3388
3386
|
codeExecution_20250522,
|
|
3389
3387
|
/**
|
|
@@ -3395,8 +3393,6 @@ var anthropicTools = {
|
|
|
3395
3393
|
* including writing code, in a secure, sandboxed environment.
|
|
3396
3394
|
*
|
|
3397
3395
|
* This is the latest version with enhanced Bash support and file operations.
|
|
3398
|
-
*
|
|
3399
|
-
* Tool name must be `code_execution`.
|
|
3400
3396
|
*/
|
|
3401
3397
|
codeExecution_20250825,
|
|
3402
3398
|
/**
|
|
@@ -3405,8 +3401,6 @@ var anthropicTools = {
|
|
|
3405
3401
|
*
|
|
3406
3402
|
* Image results are supported.
|
|
3407
3403
|
*
|
|
3408
|
-
* Tool name must be `computer`.
|
|
3409
|
-
*
|
|
3410
3404
|
* @param displayWidthPx - The width of the display being controlled by the model in pixels.
|
|
3411
3405
|
* @param displayHeightPx - The height of the display being controlled by the model in pixels.
|
|
3412
3406
|
* @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.
|
|
@@ -3418,8 +3412,6 @@ var anthropicTools = {
|
|
|
3418
3412
|
*
|
|
3419
3413
|
* Image results are supported.
|
|
3420
3414
|
*
|
|
3421
|
-
* Tool name must be `computer`.
|
|
3422
|
-
*
|
|
3423
3415
|
* @param displayWidthPx - The width of the display being controlled by the model in pixels.
|
|
3424
3416
|
* @param displayHeightPx - The height of the display being controlled by the model in pixels.
|
|
3425
3417
|
* @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.
|
|
@@ -3432,8 +3424,6 @@ var anthropicTools = {
|
|
|
3432
3424
|
* The memory tool operates client-side—you control where and how the data is stored through your own infrastructure.
|
|
3433
3425
|
*
|
|
3434
3426
|
* Supported models: Claude Sonnet 4.5, Claude Sonnet 4, Claude Opus 4.1, Claude Opus 4.
|
|
3435
|
-
*
|
|
3436
|
-
* Tool name must be `memory`.
|
|
3437
3427
|
*/
|
|
3438
3428
|
memory_20250818,
|
|
3439
3429
|
/**
|
|
@@ -3442,8 +3432,6 @@ var anthropicTools = {
|
|
|
3442
3432
|
* to directly interact with your files, providing hands-on assistance rather than just suggesting changes.
|
|
3443
3433
|
*
|
|
3444
3434
|
* Supported models: Claude Sonnet 3.5
|
|
3445
|
-
*
|
|
3446
|
-
* Tool name must be `str_replace_editor`.
|
|
3447
3435
|
*/
|
|
3448
3436
|
textEditor_20241022,
|
|
3449
3437
|
/**
|
|
@@ -3452,8 +3440,6 @@ var anthropicTools = {
|
|
|
3452
3440
|
* to directly interact with your files, providing hands-on assistance rather than just suggesting changes.
|
|
3453
3441
|
*
|
|
3454
3442
|
* Supported models: Claude Sonnet 3.7
|
|
3455
|
-
*
|
|
3456
|
-
* Tool name must be `str_replace_editor`.
|
|
3457
3443
|
*/
|
|
3458
3444
|
textEditor_20250124,
|
|
3459
3445
|
/**
|
|
@@ -3463,8 +3449,6 @@ var anthropicTools = {
|
|
|
3463
3449
|
*
|
|
3464
3450
|
* Note: This version does not support the "undo_edit" command.
|
|
3465
3451
|
*
|
|
3466
|
-
* Tool name must be `str_replace_based_edit_tool`.
|
|
3467
|
-
*
|
|
3468
3452
|
* @deprecated Use textEditor_20250728 instead
|
|
3469
3453
|
*/
|
|
3470
3454
|
textEditor_20250429,
|
|
@@ -3477,16 +3461,12 @@ var anthropicTools = {
|
|
|
3477
3461
|
*
|
|
3478
3462
|
* Supported models: Claude Sonnet 4, Opus 4, and Opus 4.1
|
|
3479
3463
|
*
|
|
3480
|
-
* Tool name must be `str_replace_based_edit_tool`.
|
|
3481
|
-
*
|
|
3482
3464
|
* @param maxCharacters - Optional maximum number of characters to view in the file
|
|
3483
3465
|
*/
|
|
3484
3466
|
textEditor_20250728,
|
|
3485
3467
|
/**
|
|
3486
3468
|
* Creates a web fetch tool that gives Claude direct access to real-time web content.
|
|
3487
3469
|
*
|
|
3488
|
-
* Tool name must be `web_fetch`.
|
|
3489
|
-
*
|
|
3490
3470
|
* @param maxUses - The max_uses parameter limits the number of web fetches performed
|
|
3491
3471
|
* @param allowedDomains - Only fetch from these domains
|
|
3492
3472
|
* @param blockedDomains - Never fetch from these domains
|
|
@@ -3497,8 +3477,6 @@ var anthropicTools = {
|
|
|
3497
3477
|
/**
|
|
3498
3478
|
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
3499
3479
|
*
|
|
3500
|
-
* Tool name must be `web_search`.
|
|
3501
|
-
*
|
|
3502
3480
|
* @param maxUses - Maximum number of web searches Claude can perform during the conversation.
|
|
3503
3481
|
* @param allowedDomains - Optional list of domains that Claude is allowed to search.
|
|
3504
3482
|
* @param blockedDomains - Optional list of domains that Claude should avoid when searching.
|