@ai-sdk/anthropic 3.0.0-beta.64 → 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.
@@ -42,7 +42,7 @@ declare const anthropicTools: {
42
42
  *
43
43
  * Tool name must be `bash`.
44
44
  */
45
- bash_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
45
+ bash_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
46
46
  command: string;
47
47
  restart?: boolean;
48
48
  }, {}>;
@@ -54,7 +54,7 @@ declare const anthropicTools: {
54
54
  *
55
55
  * Tool name must be `bash`.
56
56
  */
57
- bash_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
57
+ bash_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
58
58
  command: string;
59
59
  restart?: boolean;
60
60
  }, {}>;
@@ -68,7 +68,7 @@ declare const anthropicTools: {
68
68
  *
69
69
  * Tool name must be `code_execution`.
70
70
  */
71
- codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
71
+ codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
72
72
  code: string;
73
73
  }, {
74
74
  type: "code_execution_result";
@@ -95,7 +95,7 @@ declare const anthropicTools: {
95
95
  *
96
96
  * Tool name must be `code_execution`.
97
97
  */
98
- codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
98
+ codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
99
99
  type: "bash_code_execution";
100
100
  command: string;
101
101
  } | {
@@ -208,7 +208,7 @@ declare const anthropicTools: {
208
208
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
209
209
  * @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.
210
210
  */
211
- computer_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
211
+ computer_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
212
212
  action: "key" | "type" | "mouse_move" | "left_click" | "left_click_drag" | "right_click" | "middle_click" | "double_click" | "screenshot" | "cursor_position";
213
213
  coordinate?: number[];
214
214
  text?: string;
@@ -229,7 +229,7 @@ declare const anthropicTools: {
229
229
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
230
230
  * @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.
231
231
  */
232
- computer_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
232
+ computer_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
233
233
  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";
234
234
  coordinate?: [number, number];
235
235
  duration?: number;
@@ -252,7 +252,7 @@ declare const anthropicTools: {
252
252
  *
253
253
  * Tool name must be `memory`.
254
254
  */
255
- memory_20250818: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
255
+ memory_20250818: _ai_sdk_provider_utils.ProviderToolFactory<{
256
256
  command: "view";
257
257
  path: string;
258
258
  view_range?: [number, number];
@@ -287,7 +287,7 @@ declare const anthropicTools: {
287
287
  *
288
288
  * Tool name must be `str_replace_editor`.
289
289
  */
290
- textEditor_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
290
+ textEditor_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
291
291
  command: "view" | "create" | "str_replace" | "insert" | "undo_edit";
292
292
  path: string;
293
293
  file_text?: string;
@@ -305,7 +305,7 @@ declare const anthropicTools: {
305
305
  *
306
306
  * Tool name must be `str_replace_editor`.
307
307
  */
308
- textEditor_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
308
+ textEditor_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
309
309
  command: "view" | "create" | "str_replace" | "insert" | "undo_edit";
310
310
  path: string;
311
311
  file_text?: string;
@@ -325,7 +325,7 @@ declare const anthropicTools: {
325
325
  *
326
326
  * @deprecated Use textEditor_20250728 instead
327
327
  */
328
- textEditor_20250429: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
328
+ textEditor_20250429: _ai_sdk_provider_utils.ProviderToolFactory<{
329
329
  command: "view" | "create" | "str_replace" | "insert";
330
330
  path: string;
331
331
  file_text?: string;
@@ -347,7 +347,7 @@ declare const anthropicTools: {
347
347
  *
348
348
  * @param maxCharacters - Optional maximum number of characters to view in the file
349
349
  */
350
- textEditor_20250728: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactory<{
350
+ textEditor_20250728: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactory<{
351
351
  command: "view" | "create" | "str_replace" | "insert";
352
352
  path: string;
353
353
  file_text?: string;
@@ -377,7 +377,7 @@ declare const anthropicTools: {
377
377
  * @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.
378
378
  * @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
379
379
  */
380
- webFetch_20250910: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
380
+ webFetch_20250910: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
381
381
  url: string;
382
382
  }, {
383
383
  type: "web_fetch_result";
@@ -440,7 +440,7 @@ declare const anthropicTools: {
440
440
  * @param blockedDomains - Optional list of domains that Claude should avoid when searching.
441
441
  * @param userLocation - Optional user location information to provide geographically relevant search results.
442
442
  */
443
- webSearch_20250305: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
443
+ webSearch_20250305: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
444
444
  query: string;
445
445
  }, {
446
446
  type: "web_search_result";
@@ -42,7 +42,7 @@ declare const anthropicTools: {
42
42
  *
43
43
  * Tool name must be `bash`.
44
44
  */
45
- bash_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
45
+ bash_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
46
46
  command: string;
47
47
  restart?: boolean;
48
48
  }, {}>;
@@ -54,7 +54,7 @@ declare const anthropicTools: {
54
54
  *
55
55
  * Tool name must be `bash`.
56
56
  */
57
- bash_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
57
+ bash_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
58
58
  command: string;
59
59
  restart?: boolean;
60
60
  }, {}>;
@@ -68,7 +68,7 @@ declare const anthropicTools: {
68
68
  *
69
69
  * Tool name must be `code_execution`.
70
70
  */
71
- codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
71
+ codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
72
72
  code: string;
73
73
  }, {
74
74
  type: "code_execution_result";
@@ -95,7 +95,7 @@ declare const anthropicTools: {
95
95
  *
96
96
  * Tool name must be `code_execution`.
97
97
  */
98
- codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
98
+ codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
99
99
  type: "bash_code_execution";
100
100
  command: string;
101
101
  } | {
@@ -208,7 +208,7 @@ declare const anthropicTools: {
208
208
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
209
209
  * @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.
210
210
  */
211
- computer_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
211
+ computer_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
212
212
  action: "key" | "type" | "mouse_move" | "left_click" | "left_click_drag" | "right_click" | "middle_click" | "double_click" | "screenshot" | "cursor_position";
213
213
  coordinate?: number[];
214
214
  text?: string;
@@ -229,7 +229,7 @@ declare const anthropicTools: {
229
229
  * @param displayHeightPx - The height of the display being controlled by the model in pixels.
230
230
  * @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.
231
231
  */
232
- computer_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
232
+ computer_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
233
233
  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";
234
234
  coordinate?: [number, number];
235
235
  duration?: number;
@@ -252,7 +252,7 @@ declare const anthropicTools: {
252
252
  *
253
253
  * Tool name must be `memory`.
254
254
  */
255
- memory_20250818: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
255
+ memory_20250818: _ai_sdk_provider_utils.ProviderToolFactory<{
256
256
  command: "view";
257
257
  path: string;
258
258
  view_range?: [number, number];
@@ -287,7 +287,7 @@ declare const anthropicTools: {
287
287
  *
288
288
  * Tool name must be `str_replace_editor`.
289
289
  */
290
- textEditor_20241022: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
290
+ textEditor_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
291
291
  command: "view" | "create" | "str_replace" | "insert" | "undo_edit";
292
292
  path: string;
293
293
  file_text?: string;
@@ -305,7 +305,7 @@ declare const anthropicTools: {
305
305
  *
306
306
  * Tool name must be `str_replace_editor`.
307
307
  */
308
- textEditor_20250124: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
308
+ textEditor_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
309
309
  command: "view" | "create" | "str_replace" | "insert" | "undo_edit";
310
310
  path: string;
311
311
  file_text?: string;
@@ -325,7 +325,7 @@ declare const anthropicTools: {
325
325
  *
326
326
  * @deprecated Use textEditor_20250728 instead
327
327
  */
328
- textEditor_20250429: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
328
+ textEditor_20250429: _ai_sdk_provider_utils.ProviderToolFactory<{
329
329
  command: "view" | "create" | "str_replace" | "insert";
330
330
  path: string;
331
331
  file_text?: string;
@@ -347,7 +347,7 @@ declare const anthropicTools: {
347
347
  *
348
348
  * @param maxCharacters - Optional maximum number of characters to view in the file
349
349
  */
350
- textEditor_20250728: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactory<{
350
+ textEditor_20250728: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactory<{
351
351
  command: "view" | "create" | "str_replace" | "insert";
352
352
  path: string;
353
353
  file_text?: string;
@@ -377,7 +377,7 @@ declare const anthropicTools: {
377
377
  * @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.
378
378
  * @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
379
379
  */
380
- webFetch_20250910: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
380
+ webFetch_20250910: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
381
381
  url: string;
382
382
  }, {
383
383
  type: "web_fetch_result";
@@ -440,7 +440,7 @@ declare const anthropicTools: {
440
440
  * @param blockedDomains - Optional list of domains that Claude should avoid when searching.
441
441
  * @param userLocation - Optional user location information to provide geographically relevant search results.
442
442
  */
443
- webSearch_20250305: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
443
+ webSearch_20250305: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
444
444
  query: string;
445
445
  }, {
446
446
  type: "web_search_result";
@@ -731,9 +731,8 @@ var textEditor_20250728InputSchema = (0, import_provider_utils4.lazySchema)(
731
731
  })
732
732
  )
733
733
  );
734
- var factory = (0, import_provider_utils3.createProviderDefinedToolFactory)({
734
+ var factory = (0, import_provider_utils3.createProviderToolFactory)({
735
735
  id: "anthropic.text_editor_20250728",
736
- name: "str_replace_based_edit_tool",
737
736
  inputSchema: textEditor_20250728InputSchema
738
737
  });
739
738
  var textEditor_20250728 = (args = {}) => {
@@ -779,9 +778,8 @@ var webSearch_20250305InputSchema = (0, import_provider_utils5.lazySchema)(
779
778
  })
780
779
  )
781
780
  );
782
- var factory2 = (0, import_provider_utils5.createProviderDefinedToolFactoryWithOutputSchema)({
781
+ var factory2 = (0, import_provider_utils5.createProviderToolFactoryWithOutputSchema)({
783
782
  id: "anthropic.web_search_20250305",
784
- name: "web_search",
785
783
  inputSchema: webSearch_20250305InputSchema,
786
784
  outputSchema: webSearch_20250305OutputSchema
787
785
  });
@@ -836,9 +834,8 @@ var webFetch_20250910InputSchema = (0, import_provider_utils6.lazySchema)(
836
834
  })
837
835
  )
838
836
  );
839
- var factory3 = (0, import_provider_utils6.createProviderDefinedToolFactoryWithOutputSchema)({
837
+ var factory3 = (0, import_provider_utils6.createProviderToolFactoryWithOutputSchema)({
840
838
  id: "anthropic.web_fetch_20250910",
841
- name: "web_fetch",
842
839
  inputSchema: webFetch_20250910InputSchema,
843
840
  outputSchema: webFetch_20250910OutputSchema
844
841
  });
@@ -877,7 +874,7 @@ async function prepareTools({
877
874
  });
878
875
  break;
879
876
  }
880
- case "provider-defined": {
877
+ case "provider": {
881
878
  switch (tool.id) {
882
879
  case "anthropic.code_execution_20250522": {
883
880
  betas.add("code-execution-2025-05-22");
@@ -1115,9 +1112,8 @@ var codeExecution_20250522InputSchema = (0, import_provider_utils8.lazySchema)(
1115
1112
  })
1116
1113
  )
1117
1114
  );
1118
- var factory4 = (0, import_provider_utils8.createProviderDefinedToolFactoryWithOutputSchema)({
1115
+ var factory4 = (0, import_provider_utils8.createProviderToolFactoryWithOutputSchema)({
1119
1116
  id: "anthropic.code_execution_20250522",
1120
- name: "code_execution",
1121
1117
  inputSchema: codeExecution_20250522InputSchema,
1122
1118
  outputSchema: codeExecution_20250522OutputSchema
1123
1119
  });
@@ -1204,9 +1200,8 @@ var codeExecution_20250825InputSchema = (0, import_provider_utils9.lazySchema)(
1204
1200
  ])
1205
1201
  )
1206
1202
  );
1207
- var factory5 = (0, import_provider_utils9.createProviderDefinedToolFactoryWithOutputSchema)({
1203
+ var factory5 = (0, import_provider_utils9.createProviderToolFactoryWithOutputSchema)({
1208
1204
  id: "anthropic.code_execution_20250825",
1209
- name: "code_execution",
1210
1205
  inputSchema: codeExecution_20250825InputSchema,
1211
1206
  outputSchema: codeExecution_20250825OutputSchema
1212
1207
  });
@@ -2082,7 +2077,7 @@ var AnthropicMessagesLanguageModel = class {
2082
2077
  betas.add("skills-2025-10-02");
2083
2078
  betas.add("files-api-2025-04-14");
2084
2079
  if (!(tools == null ? void 0 : tools.some(
2085
- (tool) => tool.type === "provider-defined" && tool.id === "anthropic.code_execution_20250825"
2080
+ (tool) => tool.type === "provider" && tool.id === "anthropic.code_execution_20250825"
2086
2081
  ))) {
2087
2082
  warnings.push({
2088
2083
  type: "other",
@@ -3097,9 +3092,8 @@ var bash_20241022InputSchema = (0, import_provider_utils12.lazySchema)(
3097
3092
  })
3098
3093
  )
3099
3094
  );
3100
- var bash_20241022 = (0, import_provider_utils12.createProviderDefinedToolFactory)({
3095
+ var bash_20241022 = (0, import_provider_utils12.createProviderToolFactory)({
3101
3096
  id: "anthropic.bash_20241022",
3102
- name: "bash",
3103
3097
  inputSchema: bash_20241022InputSchema
3104
3098
  });
3105
3099
 
@@ -3114,9 +3108,8 @@ var bash_20250124InputSchema = (0, import_provider_utils13.lazySchema)(
3114
3108
  })
3115
3109
  )
3116
3110
  );
3117
- var bash_20250124 = (0, import_provider_utils13.createProviderDefinedToolFactory)({
3111
+ var bash_20250124 = (0, import_provider_utils13.createProviderToolFactory)({
3118
3112
  id: "anthropic.bash_20250124",
3119
- name: "bash",
3120
3113
  inputSchema: bash_20250124InputSchema
3121
3114
  });
3122
3115
 
@@ -3143,9 +3136,8 @@ var computer_20241022InputSchema = (0, import_provider_utils14.lazySchema)(
3143
3136
  })
3144
3137
  )
3145
3138
  );
3146
- var computer_20241022 = (0, import_provider_utils14.createProviderDefinedToolFactory)({
3139
+ var computer_20241022 = (0, import_provider_utils14.createProviderToolFactory)({
3147
3140
  id: "anthropic.computer_20241022",
3148
- name: "computer",
3149
3141
  inputSchema: computer_20241022InputSchema
3150
3142
  });
3151
3143
 
@@ -3182,9 +3174,8 @@ var computer_20250124InputSchema = (0, import_provider_utils15.lazySchema)(
3182
3174
  })
3183
3175
  )
3184
3176
  );
3185
- var computer_20250124 = (0, import_provider_utils15.createProviderDefinedToolFactory)({
3177
+ var computer_20250124 = (0, import_provider_utils15.createProviderToolFactory)({
3186
3178
  id: "anthropic.computer_20250124",
3187
- name: "computer",
3188
3179
  inputSchema: computer_20250124InputSchema
3189
3180
  });
3190
3181
 
@@ -3228,9 +3219,8 @@ var memory_20250818InputSchema = (0, import_provider_utils16.lazySchema)(
3228
3219
  ])
3229
3220
  )
3230
3221
  );
3231
- var memory_20250818 = (0, import_provider_utils16.createProviderDefinedToolFactory)({
3222
+ var memory_20250818 = (0, import_provider_utils16.createProviderToolFactory)({
3232
3223
  id: "anthropic.memory_20250818",
3233
- name: "memory",
3234
3224
  inputSchema: memory_20250818InputSchema
3235
3225
  });
3236
3226
 
@@ -3250,9 +3240,8 @@ var textEditor_20241022InputSchema = (0, import_provider_utils17.lazySchema)(
3250
3240
  })
3251
3241
  )
3252
3242
  );
3253
- var textEditor_20241022 = (0, import_provider_utils17.createProviderDefinedToolFactory)({
3243
+ var textEditor_20241022 = (0, import_provider_utils17.createProviderToolFactory)({
3254
3244
  id: "anthropic.text_editor_20241022",
3255
- name: "str_replace_editor",
3256
3245
  inputSchema: textEditor_20241022InputSchema
3257
3246
  });
3258
3247
 
@@ -3272,9 +3261,8 @@ var textEditor_20250124InputSchema = (0, import_provider_utils18.lazySchema)(
3272
3261
  })
3273
3262
  )
3274
3263
  );
3275
- var textEditor_20250124 = (0, import_provider_utils18.createProviderDefinedToolFactory)({
3264
+ var textEditor_20250124 = (0, import_provider_utils18.createProviderToolFactory)({
3276
3265
  id: "anthropic.text_editor_20250124",
3277
- name: "str_replace_editor",
3278
3266
  inputSchema: textEditor_20250124InputSchema
3279
3267
  });
3280
3268
 
@@ -3294,9 +3282,8 @@ var textEditor_20250429InputSchema = (0, import_provider_utils19.lazySchema)(
3294
3282
  })
3295
3283
  )
3296
3284
  );
3297
- var textEditor_20250429 = (0, import_provider_utils19.createProviderDefinedToolFactory)({
3285
+ var textEditor_20250429 = (0, import_provider_utils19.createProviderToolFactory)({
3298
3286
  id: "anthropic.text_editor_20250429",
3299
- name: "str_replace_based_edit_tool",
3300
3287
  inputSchema: textEditor_20250429InputSchema
3301
3288
  });
3302
3289