@ai-sdk/anthropic 3.0.0-beta.74 → 3.0.0-beta.76

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,19 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 3.0.0-beta.76
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [53f3368]
8
+ - @ai-sdk/provider@3.0.0-beta.25
9
+ - @ai-sdk/provider-utils@4.0.0-beta.44
10
+
11
+ ## 3.0.0-beta.75
12
+
13
+ ### Patch Changes
14
+
15
+ - 0ae783e: feat(anthropic): add the new tool search tools
16
+
3
17
  ## 3.0.0-beta.74
4
18
 
5
19
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -86,6 +86,10 @@ declare const anthropicProviderOptions: z.ZodObject<{
86
86
  }, z.core.$strip>;
87
87
  type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
88
88
 
89
+ interface AnthropicToolOptions {
90
+ deferLoading?: boolean;
91
+ }
92
+
89
93
  declare const anthropicTools: {
90
94
  /**
91
95
  * The bash tool enables Claude to execute shell commands in a persistent bash session,
@@ -495,6 +499,58 @@ declare const anthropicTools: {
495
499
  pageAge: string | null;
496
500
  encryptedContent: string;
497
501
  }[]>;
502
+ /**
503
+ * Creates a tool search tool that uses regex patterns to find tools.
504
+ *
505
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
506
+ * by dynamically discovering and loading them on-demand. Instead of loading all
507
+ * tool definitions into the context window upfront, Claude searches your tool
508
+ * catalog and loads only the tools it needs.
509
+ *
510
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
511
+ * to mark them for deferred loading.
512
+ *
513
+ * Supported models: Claude Opus 4.5, Claude Sonnet 4.5
514
+ */
515
+ toolSearchRegex_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
516
+ pattern: string;
517
+ limit?: number;
518
+ }, {
519
+ type: "tool_reference";
520
+ toolName: string;
521
+ }[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
522
+ pattern: string;
523
+ limit?: number;
524
+ }, {
525
+ type: "tool_reference";
526
+ toolName: string;
527
+ }[]>;
528
+ /**
529
+ * Creates a tool search tool that uses BM25 (natural language) to find tools.
530
+ *
531
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
532
+ * by dynamically discovering and loading them on-demand. Instead of loading all
533
+ * tool definitions into the context window upfront, Claude searches your tool
534
+ * catalog and loads only the tools it needs.
535
+ *
536
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
537
+ * to mark them for deferred loading.
538
+ *
539
+ * Supported models: Claude Opus 4.5, Claude Sonnet 4.5
540
+ */
541
+ toolSearchBm25_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
542
+ query: string;
543
+ limit?: number;
544
+ }, {
545
+ type: "tool_reference";
546
+ toolName: string;
547
+ }[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
548
+ query: string;
549
+ limit?: number;
550
+ }, {
551
+ type: "tool_reference";
552
+ toolName: string;
553
+ }[]>;
498
554
  };
499
555
 
500
556
  interface AnthropicProvider extends ProviderV3 {
@@ -551,4 +607,4 @@ declare const anthropic: AnthropicProvider;
551
607
 
552
608
  declare const VERSION: string;
553
609
 
554
- export { type AnthropicMessageMetadata, type AnthropicProvider, type AnthropicProviderOptions, type AnthropicProviderSettings, VERSION, anthropic, createAnthropic };
610
+ export { type AnthropicMessageMetadata, type AnthropicProvider, type AnthropicProviderOptions, type AnthropicProviderSettings, type AnthropicToolOptions, VERSION, anthropic, createAnthropic };
package/dist/index.d.ts CHANGED
@@ -86,6 +86,10 @@ declare const anthropicProviderOptions: z.ZodObject<{
86
86
  }, z.core.$strip>;
87
87
  type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
88
88
 
89
+ interface AnthropicToolOptions {
90
+ deferLoading?: boolean;
91
+ }
92
+
89
93
  declare const anthropicTools: {
90
94
  /**
91
95
  * The bash tool enables Claude to execute shell commands in a persistent bash session,
@@ -495,6 +499,58 @@ declare const anthropicTools: {
495
499
  pageAge: string | null;
496
500
  encryptedContent: string;
497
501
  }[]>;
502
+ /**
503
+ * Creates a tool search tool that uses regex patterns to find tools.
504
+ *
505
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
506
+ * by dynamically discovering and loading them on-demand. Instead of loading all
507
+ * tool definitions into the context window upfront, Claude searches your tool
508
+ * catalog and loads only the tools it needs.
509
+ *
510
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
511
+ * to mark them for deferred loading.
512
+ *
513
+ * Supported models: Claude Opus 4.5, Claude Sonnet 4.5
514
+ */
515
+ toolSearchRegex_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
516
+ pattern: string;
517
+ limit?: number;
518
+ }, {
519
+ type: "tool_reference";
520
+ toolName: string;
521
+ }[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
522
+ pattern: string;
523
+ limit?: number;
524
+ }, {
525
+ type: "tool_reference";
526
+ toolName: string;
527
+ }[]>;
528
+ /**
529
+ * Creates a tool search tool that uses BM25 (natural language) to find tools.
530
+ *
531
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
532
+ * by dynamically discovering and loading them on-demand. Instead of loading all
533
+ * tool definitions into the context window upfront, Claude searches your tool
534
+ * catalog and loads only the tools it needs.
535
+ *
536
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
537
+ * to mark them for deferred loading.
538
+ *
539
+ * Supported models: Claude Opus 4.5, Claude Sonnet 4.5
540
+ */
541
+ toolSearchBm25_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
542
+ query: string;
543
+ limit?: number;
544
+ }, {
545
+ type: "tool_reference";
546
+ toolName: string;
547
+ }[], {}>>[0]) => _ai_sdk_provider_utils.Tool<{
548
+ query: string;
549
+ limit?: number;
550
+ }, {
551
+ type: "tool_reference";
552
+ toolName: string;
553
+ }[]>;
498
554
  };
499
555
 
500
556
  interface AnthropicProvider extends ProviderV3 {
@@ -551,4 +607,4 @@ declare const anthropic: AnthropicProvider;
551
607
 
552
608
  declare const VERSION: string;
553
609
 
554
- export { type AnthropicMessageMetadata, type AnthropicProvider, type AnthropicProviderOptions, type AnthropicProviderSettings, VERSION, anthropic, createAnthropic };
610
+ export { type AnthropicMessageMetadata, type AnthropicProvider, type AnthropicProviderOptions, type AnthropicProviderSettings, type AnthropicToolOptions, VERSION, anthropic, createAnthropic };