@ai-sdk/anthropic 3.0.0-beta.65 → 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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 3.0.0-beta.66
4
+
5
+ ### Patch Changes
6
+
7
+ - 544d4e8: chore(specification): rename v3 provider defined tool to provider tool
8
+ - Updated dependencies [544d4e8]
9
+ - @ai-sdk/provider-utils@4.0.0-beta.40
10
+ - @ai-sdk/provider@3.0.0-beta.22
11
+
3
12
  ## 3.0.0-beta.65
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -95,7 +95,7 @@ declare const anthropicTools: {
95
95
  *
96
96
  * Tool name must be `bash`.
97
97
  */
98
- bash_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
98
+ bash_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
99
99
  command: string;
100
100
  restart?: boolean;
101
101
  }, {}>;
@@ -107,7 +107,7 @@ declare const anthropicTools: {
107
107
  *
108
108
  * Tool name must be `bash`.
109
109
  */
110
- bash_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
110
+ bash_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
111
111
  command: string;
112
112
  restart?: boolean;
113
113
  }, {}>;
@@ -121,7 +121,7 @@ declare const anthropicTools: {
121
121
  *
122
122
  * Tool name must be `code_execution`.
123
123
  */
124
- codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
124
+ codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
125
125
  code: string;
126
126
  }, {
127
127
  type: "code_execution_result";
@@ -148,7 +148,7 @@ declare const anthropicTools: {
148
148
  *
149
149
  * Tool name must be `code_execution`.
150
150
  */
151
- codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
151
+ codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
152
152
  type: "bash_code_execution";
153
153
  command: string;
154
154
  } | {
@@ -261,7 +261,7 @@ declare const anthropicTools: {
261
261
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
262
262
  * @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.
263
263
  */
264
- computer_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
264
+ computer_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
265
265
  action: "key" | "type" | "mouse_move" | "left_click" | "left_click_drag" | "right_click" | "middle_click" | "double_click" | "screenshot" | "cursor_position";
266
266
  coordinate?: number[];
267
267
  text?: string;
@@ -282,7 +282,7 @@ declare const anthropicTools: {
282
282
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
283
283
  * @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.
284
284
  */
285
- computer_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
285
+ computer_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
286
286
  action: "key" | "hold_key" | "type" | "cursor_position" | "mouse_move" | "left_mouse_down" | "left_mouse_up" | "left_click" | "left_click_drag" | "right_click" | "middle_click" | "double_click" | "triple_click" | "scroll" | "wait" | "screenshot";
287
287
  coordinate?: [number, number];
288
288
  duration?: number;
@@ -305,7 +305,7 @@ declare const anthropicTools: {
305
305
  *
306
306
  * Tool name must be `memory`.
307
307
  */
308
- memory_20250818: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
308
+ memory_20250818: _ai_sdk_provider_utils.ProviderToolFactory<{
309
309
  command: "view";
310
310
  path: string;
311
311
  view_range?: [number, number];
@@ -340,7 +340,7 @@ declare const anthropicTools: {
340
340
  *
341
341
  * Tool name must be `str_replace_editor`.
342
342
  */
343
- textEditor_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
343
+ textEditor_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
344
344
  command: "view" | "create" | "str_replace" | "insert" | "undo_edit";
345
345
  path: string;
346
346
  file_text?: string;
@@ -358,7 +358,7 @@ declare const anthropicTools: {
358
358
  *
359
359
  * Tool name must be `str_replace_editor`.
360
360
  */
361
- textEditor_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
361
+ textEditor_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
362
362
  command: "view" | "create" | "str_replace" | "insert" | "undo_edit";
363
363
  path: string;
364
364
  file_text?: string;
@@ -378,7 +378,7 @@ declare const anthropicTools: {
378
378
  *
379
379
  * @deprecated Use textEditor_20250728 instead
380
380
  */
381
- textEditor_20250429: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
381
+ textEditor_20250429: _ai_sdk_provider_utils.ProviderToolFactory<{
382
382
  command: "view" | "create" | "str_replace" | "insert";
383
383
  path: string;
384
384
  file_text?: string;
@@ -400,7 +400,7 @@ declare const anthropicTools: {
400
400
  *
401
401
  * @param maxCharacters - Optional maximum number of characters to view in the file
402
402
  */
403
- textEditor_20250728: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactory<{
403
+ textEditor_20250728: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactory<{
404
404
  command: "view" | "create" | "str_replace" | "insert";
405
405
  path: string;
406
406
  file_text?: string;
@@ -430,7 +430,7 @@ declare const anthropicTools: {
430
430
  * @param citations - Unlike web search where citations are always enabled, citations are optional for web fetch. Set "citations": {"enabled": true} to enable Claude to cite specific passages from fetched documents.
431
431
  * @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
432
432
  */
433
- webFetch_20250910: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
433
+ webFetch_20250910: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
434
434
  url: string;
435
435
  }, {
436
436
  type: "web_fetch_result";
@@ -493,7 +493,7 @@ declare const anthropicTools: {
493
493
  * @param blockedDomains - Optional list of domains that Claude should avoid when searching.
494
494
  * @param userLocation - Optional user location information to provide geographically relevant search results.
495
495
  */
496
- webSearch_20250305: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
496
+ webSearch_20250305: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
497
497
  query: string;
498
498
  }, {
499
499
  type: "web_search_result";
package/dist/index.d.ts CHANGED
@@ -95,7 +95,7 @@ declare const anthropicTools: {
95
95
  *
96
96
  * Tool name must be `bash`.
97
97
  */
98
- bash_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
98
+ bash_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
99
99
  command: string;
100
100
  restart?: boolean;
101
101
  }, {}>;
@@ -107,7 +107,7 @@ declare const anthropicTools: {
107
107
  *
108
108
  * Tool name must be `bash`.
109
109
  */
110
- bash_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
110
+ bash_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
111
111
  command: string;
112
112
  restart?: boolean;
113
113
  }, {}>;
@@ -121,7 +121,7 @@ declare const anthropicTools: {
121
121
  *
122
122
  * Tool name must be `code_execution`.
123
123
  */
124
- codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
124
+ codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
125
125
  code: string;
126
126
  }, {
127
127
  type: "code_execution_result";
@@ -148,7 +148,7 @@ declare const anthropicTools: {
148
148
  *
149
149
  * Tool name must be `code_execution`.
150
150
  */
151
- codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
151
+ codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
152
152
  type: "bash_code_execution";
153
153
  command: string;
154
154
  } | {
@@ -261,7 +261,7 @@ declare const anthropicTools: {
261
261
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
262
262
  * @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.
263
263
  */
264
- computer_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
264
+ computer_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
265
265
  action: "key" | "type" | "mouse_move" | "left_click" | "left_click_drag" | "right_click" | "middle_click" | "double_click" | "screenshot" | "cursor_position";
266
266
  coordinate?: number[];
267
267
  text?: string;
@@ -282,7 +282,7 @@ declare const anthropicTools: {
282
282
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
283
283
  * @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.
284
284
  */
285
- computer_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
285
+ computer_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
286
286
  action: "key" | "hold_key" | "type" | "cursor_position" | "mouse_move" | "left_mouse_down" | "left_mouse_up" | "left_click" | "left_click_drag" | "right_click" | "middle_click" | "double_click" | "triple_click" | "scroll" | "wait" | "screenshot";
287
287
  coordinate?: [number, number];
288
288
  duration?: number;
@@ -305,7 +305,7 @@ declare const anthropicTools: {
305
305
  *
306
306
  * Tool name must be `memory`.
307
307
  */
308
- memory_20250818: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
308
+ memory_20250818: _ai_sdk_provider_utils.ProviderToolFactory<{
309
309
  command: "view";
310
310
  path: string;
311
311
  view_range?: [number, number];
@@ -340,7 +340,7 @@ declare const anthropicTools: {
340
340
  *
341
341
  * Tool name must be `str_replace_editor`.
342
342
  */
343
- textEditor_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
343
+ textEditor_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
344
344
  command: "view" | "create" | "str_replace" | "insert" | "undo_edit";
345
345
  path: string;
346
346
  file_text?: string;
@@ -358,7 +358,7 @@ declare const anthropicTools: {
358
358
  *
359
359
  * Tool name must be `str_replace_editor`.
360
360
  */
361
- textEditor_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
361
+ textEditor_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
362
362
  command: "view" | "create" | "str_replace" | "insert" | "undo_edit";
363
363
  path: string;
364
364
  file_text?: string;
@@ -378,7 +378,7 @@ declare const anthropicTools: {
378
378
  *
379
379
  * @deprecated Use textEditor_20250728 instead
380
380
  */
381
- textEditor_20250429: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
381
+ textEditor_20250429: _ai_sdk_provider_utils.ProviderToolFactory<{
382
382
  command: "view" | "create" | "str_replace" | "insert";
383
383
  path: string;
384
384
  file_text?: string;
@@ -400,7 +400,7 @@ declare const anthropicTools: {
400
400
  *
401
401
  * @param maxCharacters - Optional maximum number of characters to view in the file
402
402
  */
403
- textEditor_20250728: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactory<{
403
+ textEditor_20250728: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactory<{
404
404
  command: "view" | "create" | "str_replace" | "insert";
405
405
  path: string;
406
406
  file_text?: string;
@@ -430,7 +430,7 @@ declare const anthropicTools: {
430
430
  * @param citations - Unlike web search where citations are always enabled, citations are optional for web fetch. Set "citations": {"enabled": true} to enable Claude to cite specific passages from fetched documents.
431
431
  * @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
432
432
  */
433
- webFetch_20250910: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
433
+ webFetch_20250910: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
434
434
  url: string;
435
435
  }, {
436
436
  type: "web_fetch_result";
@@ -493,7 +493,7 @@ declare const anthropicTools: {
493
493
  * @param blockedDomains - Optional list of domains that Claude should avoid when searching.
494
494
  * @param userLocation - Optional user location information to provide geographically relevant search results.
495
495
  */
496
- webSearch_20250305: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
496
+ webSearch_20250305: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
497
497
  query: string;
498
498
  }, {
499
499
  type: "web_search_result";
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var import_provider4 = require("@ai-sdk/provider");
31
31
  var import_provider_utils20 = require("@ai-sdk/provider-utils");
32
32
 
33
33
  // src/version.ts
34
- var VERSION = true ? "3.0.0-beta.65" : "0.0.0-test";
34
+ var VERSION = true ? "3.0.0-beta.66" : "0.0.0-test";
35
35
 
36
36
  // src/anthropic-messages-language-model.ts
37
37
  var import_provider3 = require("@ai-sdk/provider");
@@ -738,7 +738,7 @@ var textEditor_20250728InputSchema = (0, import_provider_utils4.lazySchema)(
738
738
  })
739
739
  )
740
740
  );
741
- var factory = (0, import_provider_utils3.createProviderDefinedToolFactory)({
741
+ var factory = (0, import_provider_utils3.createProviderToolFactory)({
742
742
  id: "anthropic.text_editor_20250728",
743
743
  inputSchema: textEditor_20250728InputSchema
744
744
  });
@@ -785,7 +785,7 @@ var webSearch_20250305InputSchema = (0, import_provider_utils5.lazySchema)(
785
785
  })
786
786
  )
787
787
  );
788
- var factory2 = (0, import_provider_utils5.createProviderDefinedToolFactoryWithOutputSchema)({
788
+ var factory2 = (0, import_provider_utils5.createProviderToolFactoryWithOutputSchema)({
789
789
  id: "anthropic.web_search_20250305",
790
790
  inputSchema: webSearch_20250305InputSchema,
791
791
  outputSchema: webSearch_20250305OutputSchema
@@ -841,7 +841,7 @@ var webFetch_20250910InputSchema = (0, import_provider_utils6.lazySchema)(
841
841
  })
842
842
  )
843
843
  );
844
- var factory3 = (0, import_provider_utils6.createProviderDefinedToolFactoryWithOutputSchema)({
844
+ var factory3 = (0, import_provider_utils6.createProviderToolFactoryWithOutputSchema)({
845
845
  id: "anthropic.web_fetch_20250910",
846
846
  inputSchema: webFetch_20250910InputSchema,
847
847
  outputSchema: webFetch_20250910OutputSchema
@@ -881,7 +881,7 @@ async function prepareTools({
881
881
  });
882
882
  break;
883
883
  }
884
- case "provider-defined": {
884
+ case "provider": {
885
885
  switch (tool.id) {
886
886
  case "anthropic.code_execution_20250522": {
887
887
  betas.add("code-execution-2025-05-22");
@@ -1119,7 +1119,7 @@ var codeExecution_20250522InputSchema = (0, import_provider_utils8.lazySchema)(
1119
1119
  })
1120
1120
  )
1121
1121
  );
1122
- var factory4 = (0, import_provider_utils8.createProviderDefinedToolFactoryWithOutputSchema)({
1122
+ var factory4 = (0, import_provider_utils8.createProviderToolFactoryWithOutputSchema)({
1123
1123
  id: "anthropic.code_execution_20250522",
1124
1124
  inputSchema: codeExecution_20250522InputSchema,
1125
1125
  outputSchema: codeExecution_20250522OutputSchema
@@ -1207,7 +1207,7 @@ var codeExecution_20250825InputSchema = (0, import_provider_utils9.lazySchema)(
1207
1207
  ])
1208
1208
  )
1209
1209
  );
1210
- var factory5 = (0, import_provider_utils9.createProviderDefinedToolFactoryWithOutputSchema)({
1210
+ var factory5 = (0, import_provider_utils9.createProviderToolFactoryWithOutputSchema)({
1211
1211
  id: "anthropic.code_execution_20250825",
1212
1212
  inputSchema: codeExecution_20250825InputSchema,
1213
1213
  outputSchema: codeExecution_20250825OutputSchema
@@ -2084,7 +2084,7 @@ var AnthropicMessagesLanguageModel = class {
2084
2084
  betas.add("skills-2025-10-02");
2085
2085
  betas.add("files-api-2025-04-14");
2086
2086
  if (!(tools == null ? void 0 : tools.some(
2087
- (tool) => tool.type === "provider-defined" && tool.id === "anthropic.code_execution_20250825"
2087
+ (tool) => tool.type === "provider" && tool.id === "anthropic.code_execution_20250825"
2088
2088
  ))) {
2089
2089
  warnings.push({
2090
2090
  type: "other",
@@ -3099,7 +3099,7 @@ var bash_20241022InputSchema = (0, import_provider_utils12.lazySchema)(
3099
3099
  })
3100
3100
  )
3101
3101
  );
3102
- var bash_20241022 = (0, import_provider_utils12.createProviderDefinedToolFactory)({
3102
+ var bash_20241022 = (0, import_provider_utils12.createProviderToolFactory)({
3103
3103
  id: "anthropic.bash_20241022",
3104
3104
  inputSchema: bash_20241022InputSchema
3105
3105
  });
@@ -3115,7 +3115,7 @@ var bash_20250124InputSchema = (0, import_provider_utils13.lazySchema)(
3115
3115
  })
3116
3116
  )
3117
3117
  );
3118
- var bash_20250124 = (0, import_provider_utils13.createProviderDefinedToolFactory)({
3118
+ var bash_20250124 = (0, import_provider_utils13.createProviderToolFactory)({
3119
3119
  id: "anthropic.bash_20250124",
3120
3120
  inputSchema: bash_20250124InputSchema
3121
3121
  });
@@ -3143,7 +3143,7 @@ var computer_20241022InputSchema = (0, import_provider_utils14.lazySchema)(
3143
3143
  })
3144
3144
  )
3145
3145
  );
3146
- var computer_20241022 = (0, import_provider_utils14.createProviderDefinedToolFactory)({
3146
+ var computer_20241022 = (0, import_provider_utils14.createProviderToolFactory)({
3147
3147
  id: "anthropic.computer_20241022",
3148
3148
  inputSchema: computer_20241022InputSchema
3149
3149
  });
@@ -3181,7 +3181,7 @@ var computer_20250124InputSchema = (0, import_provider_utils15.lazySchema)(
3181
3181
  })
3182
3182
  )
3183
3183
  );
3184
- var computer_20250124 = (0, import_provider_utils15.createProviderDefinedToolFactory)({
3184
+ var computer_20250124 = (0, import_provider_utils15.createProviderToolFactory)({
3185
3185
  id: "anthropic.computer_20250124",
3186
3186
  inputSchema: computer_20250124InputSchema
3187
3187
  });
@@ -3226,7 +3226,7 @@ var memory_20250818InputSchema = (0, import_provider_utils16.lazySchema)(
3226
3226
  ])
3227
3227
  )
3228
3228
  );
3229
- var memory_20250818 = (0, import_provider_utils16.createProviderDefinedToolFactory)({
3229
+ var memory_20250818 = (0, import_provider_utils16.createProviderToolFactory)({
3230
3230
  id: "anthropic.memory_20250818",
3231
3231
  inputSchema: memory_20250818InputSchema
3232
3232
  });
@@ -3247,7 +3247,7 @@ var textEditor_20241022InputSchema = (0, import_provider_utils17.lazySchema)(
3247
3247
  })
3248
3248
  )
3249
3249
  );
3250
- var textEditor_20241022 = (0, import_provider_utils17.createProviderDefinedToolFactory)({
3250
+ var textEditor_20241022 = (0, import_provider_utils17.createProviderToolFactory)({
3251
3251
  id: "anthropic.text_editor_20241022",
3252
3252
  inputSchema: textEditor_20241022InputSchema
3253
3253
  });
@@ -3268,7 +3268,7 @@ var textEditor_20250124InputSchema = (0, import_provider_utils18.lazySchema)(
3268
3268
  })
3269
3269
  )
3270
3270
  );
3271
- var textEditor_20250124 = (0, import_provider_utils18.createProviderDefinedToolFactory)({
3271
+ var textEditor_20250124 = (0, import_provider_utils18.createProviderToolFactory)({
3272
3272
  id: "anthropic.text_editor_20250124",
3273
3273
  inputSchema: textEditor_20250124InputSchema
3274
3274
  });
@@ -3289,7 +3289,7 @@ var textEditor_20250429InputSchema = (0, import_provider_utils19.lazySchema)(
3289
3289
  })
3290
3290
  )
3291
3291
  );
3292
- var textEditor_20250429 = (0, import_provider_utils19.createProviderDefinedToolFactory)({
3292
+ var textEditor_20250429 = (0, import_provider_utils19.createProviderToolFactory)({
3293
3293
  id: "anthropic.text_editor_20250429",
3294
3294
  inputSchema: textEditor_20250429InputSchema
3295
3295
  });