@ai-sdk/anthropic 3.0.0-beta.73 → 3.0.0-beta.75

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.
@@ -442,6 +442,58 @@ declare const anthropicTools: {
442
442
  pageAge: string | null;
443
443
  encryptedContent: string;
444
444
  }[]>;
445
+ /**
446
+ * Creates a tool search tool that uses regex patterns to find tools.
447
+ *
448
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
449
+ * by dynamically discovering and loading them on-demand. Instead of loading all
450
+ * tool definitions into the context window upfront, Claude searches your tool
451
+ * catalog and loads only the tools it needs.
452
+ *
453
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
454
+ * to mark them for deferred loading.
455
+ *
456
+ * Supported models: Claude Opus 4.5, Claude Sonnet 4.5
457
+ */
458
+ toolSearchRegex_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
459
+ pattern: string;
460
+ limit?: number;
461
+ }, {
462
+ type: "tool_reference";
463
+ toolName: string;
464
+ }[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
465
+ pattern: string;
466
+ limit?: number;
467
+ }, {
468
+ type: "tool_reference";
469
+ toolName: string;
470
+ }[]>;
471
+ /**
472
+ * Creates a tool search tool that uses BM25 (natural language) to find tools.
473
+ *
474
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
475
+ * by dynamically discovering and loading them on-demand. Instead of loading all
476
+ * tool definitions into the context window upfront, Claude searches your tool
477
+ * catalog and loads only the tools it needs.
478
+ *
479
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
480
+ * to mark them for deferred loading.
481
+ *
482
+ * Supported models: Claude Opus 4.5, Claude Sonnet 4.5
483
+ */
484
+ toolSearchBm25_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
485
+ query: string;
486
+ limit?: number;
487
+ }, {
488
+ type: "tool_reference";
489
+ toolName: string;
490
+ }[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
491
+ query: string;
492
+ limit?: number;
493
+ }, {
494
+ type: "tool_reference";
495
+ toolName: string;
496
+ }[]>;
445
497
  };
446
498
 
447
499
  type AnthropicCacheControl = {
@@ -454,6 +506,11 @@ type AnthropicTool = {
454
506
  input_schema: JSONSchema7;
455
507
  cache_control: AnthropicCacheControl | undefined;
456
508
  strict?: boolean;
509
+ /**
510
+ * When true, this tool is deferred and will only be loaded when
511
+ * discovered via the tool search tool.
512
+ */
513
+ defer_loading?: boolean;
457
514
  } | {
458
515
  type: 'code_execution_20250522';
459
516
  name: string;
@@ -509,6 +566,12 @@ type AnthropicTool = {
509
566
  timezone?: string;
510
567
  };
511
568
  cache_control: AnthropicCacheControl | undefined;
569
+ } | {
570
+ type: 'tool_search_tool_regex_20251119';
571
+ name: string;
572
+ } | {
573
+ type: 'tool_search_tool_bm25_20251119';
574
+ name: string;
512
575
  };
513
576
  type AnthropicToolChoice = {
514
577
  type: 'auto' | 'any';
@@ -442,6 +442,58 @@ declare const anthropicTools: {
442
442
  pageAge: string | null;
443
443
  encryptedContent: string;
444
444
  }[]>;
445
+ /**
446
+ * Creates a tool search tool that uses regex patterns to find tools.
447
+ *
448
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
449
+ * by dynamically discovering and loading them on-demand. Instead of loading all
450
+ * tool definitions into the context window upfront, Claude searches your tool
451
+ * catalog and loads only the tools it needs.
452
+ *
453
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
454
+ * to mark them for deferred loading.
455
+ *
456
+ * Supported models: Claude Opus 4.5, Claude Sonnet 4.5
457
+ */
458
+ toolSearchRegex_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
459
+ pattern: string;
460
+ limit?: number;
461
+ }, {
462
+ type: "tool_reference";
463
+ toolName: string;
464
+ }[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
465
+ pattern: string;
466
+ limit?: number;
467
+ }, {
468
+ type: "tool_reference";
469
+ toolName: string;
470
+ }[]>;
471
+ /**
472
+ * Creates a tool search tool that uses BM25 (natural language) to find tools.
473
+ *
474
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
475
+ * by dynamically discovering and loading them on-demand. Instead of loading all
476
+ * tool definitions into the context window upfront, Claude searches your tool
477
+ * catalog and loads only the tools it needs.
478
+ *
479
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
480
+ * to mark them for deferred loading.
481
+ *
482
+ * Supported models: Claude Opus 4.5, Claude Sonnet 4.5
483
+ */
484
+ toolSearchBm25_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
485
+ query: string;
486
+ limit?: number;
487
+ }, {
488
+ type: "tool_reference";
489
+ toolName: string;
490
+ }[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
491
+ query: string;
492
+ limit?: number;
493
+ }, {
494
+ type: "tool_reference";
495
+ toolName: string;
496
+ }[]>;
445
497
  };
446
498
 
447
499
  type AnthropicCacheControl = {
@@ -454,6 +506,11 @@ type AnthropicTool = {
454
506
  input_schema: JSONSchema7;
455
507
  cache_control: AnthropicCacheControl | undefined;
456
508
  strict?: boolean;
509
+ /**
510
+ * When true, this tool is deferred and will only be loaded when
511
+ * discovered via the tool search tool.
512
+ */
513
+ defer_loading?: boolean;
457
514
  } | {
458
515
  type: 'code_execution_20250522';
459
516
  name: string;
@@ -509,6 +566,12 @@ type AnthropicTool = {
509
566
  timezone?: string;
510
567
  };
511
568
  cache_control: AnthropicCacheControl | undefined;
569
+ } | {
570
+ type: 'tool_search_tool_regex_20251119';
571
+ name: string;
572
+ } | {
573
+ type: 'tool_search_tool_bm25_20251119';
574
+ name: string;
512
575
  };
513
576
  type AnthropicToolChoice = {
514
577
  type: 'auto' | 'any';