@ai-sdk/anthropic 2.0.0-alpha.12 → 2.0.0-alpha.14

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.
@@ -65,7 +65,7 @@ declare function bashTool_20241022<RESULT>(options?: {
65
65
  }, RESULT>;
66
66
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
67
67
  }): {
68
- type: 'provider-defined';
68
+ type: 'provider-defined-client';
69
69
  id: 'anthropic.bash_20241022';
70
70
  args: {};
71
71
  parameters: typeof Bash20241022Parameters;
@@ -102,7 +102,7 @@ declare function bashTool_20250124<RESULT>(options?: {
102
102
  }, RESULT>;
103
103
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
104
104
  }): {
105
- type: 'provider-defined';
105
+ type: 'provider-defined-client';
106
106
  id: 'anthropic.bash_20250124';
107
107
  args: {};
108
108
  parameters: typeof Bash20250124Parameters;
@@ -174,7 +174,7 @@ declare function textEditorTool_20241022<RESULT>(options?: {
174
174
  }, RESULT>;
175
175
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
176
176
  }): {
177
- type: 'provider-defined';
177
+ type: 'provider-defined-client';
178
178
  id: 'anthropic.text_editor_20241022';
179
179
  args: {};
180
180
  parameters: typeof TextEditor20241022Parameters;
@@ -246,7 +246,7 @@ declare function textEditorTool_20250124<RESULT>(options?: {
246
246
  }, RESULT>;
247
247
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
248
248
  }): {
249
- type: 'provider-defined';
249
+ type: 'provider-defined-client';
250
250
  id: 'anthropic.text_editor_20250124';
251
251
  args: {};
252
252
  parameters: typeof TextEditor20250124Parameters;
@@ -308,7 +308,7 @@ declare function computerTool_20241022<RESULT>(options: {
308
308
  }, RESULT>;
309
309
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
310
310
  }): {
311
- type: 'provider-defined';
311
+ type: 'provider-defined-client';
312
312
  id: 'anthropic.computer_20241022';
313
313
  args: {};
314
314
  parameters: typeof Computer20241022Parameters;
@@ -403,13 +403,50 @@ declare function computerTool_20250124<RESULT>(options: {
403
403
  }, RESULT>;
404
404
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
405
405
  }): {
406
- type: 'provider-defined';
406
+ type: 'provider-defined-client';
407
407
  id: 'anthropic.computer_20250124';
408
408
  args: {};
409
409
  parameters: typeof Computer20250124Parameters;
410
410
  execute: ExecuteFunction<z.infer<typeof Computer20250124Parameters>, RESULT>;
411
411
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
412
412
  };
413
+ /**
414
+ * Creates a web search tool that gives Claude direct access to real-time web content.
415
+ * Must have name "web_search".
416
+ *
417
+ * @param maxUses - Maximum number of web searches Claude can perform during the conversation.
418
+ * @param allowedDomains - Optional list of domains that Claude is allowed to search.
419
+ * @param blockedDomains - Optional list of domains that Claude should avoid when searching.
420
+ * @param userLocation - Optional user location information to provide geographically relevant search results.
421
+ */
422
+ declare function webSearchTool_20250305(options?: {
423
+ maxUses?: number;
424
+ allowedDomains?: string[];
425
+ blockedDomains?: string[];
426
+ userLocation?: {
427
+ type: 'approximate';
428
+ city?: string;
429
+ region?: string;
430
+ country?: string;
431
+ timezone?: string;
432
+ };
433
+ }): {
434
+ type: 'provider-defined-server';
435
+ id: 'anthropic.web_search_20250305';
436
+ name: 'web_search';
437
+ args: {
438
+ maxUses?: number;
439
+ allowedDomains?: string[];
440
+ blockedDomains?: string[];
441
+ userLocation?: {
442
+ type: 'approximate';
443
+ city?: string;
444
+ region?: string;
445
+ country?: string;
446
+ timezone?: string;
447
+ };
448
+ };
449
+ };
413
450
  declare const anthropicTools: {
414
451
  bash_20241022: typeof bashTool_20241022;
415
452
  bash_20250124: typeof bashTool_20250124;
@@ -417,6 +454,7 @@ declare const anthropicTools: {
417
454
  textEditor_20250124: typeof textEditorTool_20250124;
418
455
  computer_20241022: typeof computerTool_20241022;
419
456
  computer_20250124: typeof computerTool_20250124;
457
+ webSearch_20250305: typeof webSearchTool_20250305;
420
458
  };
421
459
 
422
460
  export { AnthropicMessagesLanguageModel, type AnthropicMessagesModelId, anthropicTools };
@@ -65,7 +65,7 @@ declare function bashTool_20241022<RESULT>(options?: {
65
65
  }, RESULT>;
66
66
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
67
67
  }): {
68
- type: 'provider-defined';
68
+ type: 'provider-defined-client';
69
69
  id: 'anthropic.bash_20241022';
70
70
  args: {};
71
71
  parameters: typeof Bash20241022Parameters;
@@ -102,7 +102,7 @@ declare function bashTool_20250124<RESULT>(options?: {
102
102
  }, RESULT>;
103
103
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
104
104
  }): {
105
- type: 'provider-defined';
105
+ type: 'provider-defined-client';
106
106
  id: 'anthropic.bash_20250124';
107
107
  args: {};
108
108
  parameters: typeof Bash20250124Parameters;
@@ -174,7 +174,7 @@ declare function textEditorTool_20241022<RESULT>(options?: {
174
174
  }, RESULT>;
175
175
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
176
176
  }): {
177
- type: 'provider-defined';
177
+ type: 'provider-defined-client';
178
178
  id: 'anthropic.text_editor_20241022';
179
179
  args: {};
180
180
  parameters: typeof TextEditor20241022Parameters;
@@ -246,7 +246,7 @@ declare function textEditorTool_20250124<RESULT>(options?: {
246
246
  }, RESULT>;
247
247
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
248
248
  }): {
249
- type: 'provider-defined';
249
+ type: 'provider-defined-client';
250
250
  id: 'anthropic.text_editor_20250124';
251
251
  args: {};
252
252
  parameters: typeof TextEditor20250124Parameters;
@@ -308,7 +308,7 @@ declare function computerTool_20241022<RESULT>(options: {
308
308
  }, RESULT>;
309
309
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
310
310
  }): {
311
- type: 'provider-defined';
311
+ type: 'provider-defined-client';
312
312
  id: 'anthropic.computer_20241022';
313
313
  args: {};
314
314
  parameters: typeof Computer20241022Parameters;
@@ -403,13 +403,50 @@ declare function computerTool_20250124<RESULT>(options: {
403
403
  }, RESULT>;
404
404
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
405
405
  }): {
406
- type: 'provider-defined';
406
+ type: 'provider-defined-client';
407
407
  id: 'anthropic.computer_20250124';
408
408
  args: {};
409
409
  parameters: typeof Computer20250124Parameters;
410
410
  execute: ExecuteFunction<z.infer<typeof Computer20250124Parameters>, RESULT>;
411
411
  experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
412
412
  };
413
+ /**
414
+ * Creates a web search tool that gives Claude direct access to real-time web content.
415
+ * Must have name "web_search".
416
+ *
417
+ * @param maxUses - Maximum number of web searches Claude can perform during the conversation.
418
+ * @param allowedDomains - Optional list of domains that Claude is allowed to search.
419
+ * @param blockedDomains - Optional list of domains that Claude should avoid when searching.
420
+ * @param userLocation - Optional user location information to provide geographically relevant search results.
421
+ */
422
+ declare function webSearchTool_20250305(options?: {
423
+ maxUses?: number;
424
+ allowedDomains?: string[];
425
+ blockedDomains?: string[];
426
+ userLocation?: {
427
+ type: 'approximate';
428
+ city?: string;
429
+ region?: string;
430
+ country?: string;
431
+ timezone?: string;
432
+ };
433
+ }): {
434
+ type: 'provider-defined-server';
435
+ id: 'anthropic.web_search_20250305';
436
+ name: 'web_search';
437
+ args: {
438
+ maxUses?: number;
439
+ allowedDomains?: string[];
440
+ blockedDomains?: string[];
441
+ userLocation?: {
442
+ type: 'approximate';
443
+ city?: string;
444
+ region?: string;
445
+ country?: string;
446
+ timezone?: string;
447
+ };
448
+ };
449
+ };
413
450
  declare const anthropicTools: {
414
451
  bash_20241022: typeof bashTool_20241022;
415
452
  bash_20250124: typeof bashTool_20250124;
@@ -417,6 +454,7 @@ declare const anthropicTools: {
417
454
  textEditor_20250124: typeof textEditorTool_20250124;
418
455
  computer_20241022: typeof computerTool_20241022;
419
456
  computer_20250124: typeof computerTool_20250124;
457
+ webSearch_20250305: typeof webSearchTool_20250305;
420
458
  };
421
459
 
422
460
  export { AnthropicMessagesLanguageModel, type AnthropicMessagesModelId, anthropicTools };