@ai-sdk/anthropic 4.0.0-beta.37 → 4.0.0-beta.39

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/index.d.ts +24 -24
  3. package/dist/index.js +59 -61
  4. package/dist/index.js.map +1 -1
  5. package/dist/internal/index.d.ts +29 -29
  6. package/dist/internal/index.js +59 -60
  7. package/dist/internal/index.js.map +1 -1
  8. package/package.json +8 -6
  9. package/src/{anthropic-messages-api.ts → anthropic-api.ts} +4 -4
  10. package/src/{anthropic-messages-language-model.ts → anthropic-language-model.ts} +32 -37
  11. package/src/{anthropic-messages-options.ts → anthropic-options.ts} +1 -1
  12. package/src/anthropic-prepare-tools.ts +1 -1
  13. package/src/anthropic-provider.ts +9 -9
  14. package/src/{convert-anthropic-messages-usage.ts → convert-anthropic-usage.ts} +3 -3
  15. package/src/{convert-to-anthropic-messages-prompt.ts → convert-to-anthropic-prompt.ts} +9 -8
  16. package/src/get-cache-control.ts +1 -1
  17. package/src/index.ts +1 -1
  18. package/src/internal/index.ts +9 -3
  19. package/src/tool/bash_20241022.ts +2 -2
  20. package/src/tool/bash_20250124.ts +2 -2
  21. package/src/tool/code-execution_20250522.ts +2 -2
  22. package/src/tool/code-execution_20250825.ts +2 -2
  23. package/src/tool/code-execution_20260120.ts +2 -2
  24. package/src/tool/computer_20241022.ts +2 -2
  25. package/src/tool/computer_20250124.ts +2 -2
  26. package/src/tool/computer_20251124.ts +2 -2
  27. package/src/tool/memory_20250818.ts +2 -2
  28. package/src/tool/text-editor_20241022.ts +2 -2
  29. package/src/tool/text-editor_20250124.ts +2 -2
  30. package/src/tool/text-editor_20250429.ts +2 -2
  31. package/src/tool/text-editor_20250728.ts +2 -2
  32. package/src/tool/tool-search-bm25_20251119.ts +2 -2
  33. package/src/tool/tool-search-regex_20251119.ts +2 -2
  34. package/src/tool/web-fetch-20250910.ts +2 -2
  35. package/src/tool/web-fetch-20260209.ts +2 -2
  36. package/src/tool/web-search_20250305.ts +2 -2
  37. package/src/tool/web-search_20260209.ts +2 -2
@@ -1,5 +1,5 @@
1
1
  import {
2
- createProviderToolFactoryWithOutputSchema,
2
+ createProviderExecutedToolFactory,
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
@@ -46,7 +46,7 @@ const toolSearchRegex_20251119InputSchema = lazySchema(() =>
46
46
  ),
47
47
  );
48
48
 
49
- const factory = createProviderToolFactoryWithOutputSchema<
49
+ const factory = createProviderExecutedToolFactory<
50
50
  {
51
51
  /**
52
52
  * A regex pattern to search for tools.
@@ -1,5 +1,5 @@
1
1
  import {
2
- createProviderToolFactoryWithOutputSchema,
2
+ createProviderExecutedToolFactory,
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
@@ -52,7 +52,7 @@ const webFetch_20250910InputSchema = lazySchema(() =>
52
52
  ),
53
53
  );
54
54
 
55
- const factory = createProviderToolFactoryWithOutputSchema<
55
+ const factory = createProviderExecutedToolFactory<
56
56
  {
57
57
  /**
58
58
  * The URL to fetch.
@@ -1,5 +1,5 @@
1
1
  import {
2
- createProviderToolFactoryWithOutputSchema,
2
+ createProviderExecutedToolFactory,
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
@@ -52,7 +52,7 @@ const webFetch_20260209InputSchema = lazySchema(() =>
52
52
  ),
53
53
  );
54
54
 
55
- const factory = createProviderToolFactoryWithOutputSchema<
55
+ const factory = createProviderExecutedToolFactory<
56
56
  {
57
57
  /**
58
58
  * The URL to fetch.
@@ -1,5 +1,5 @@
1
1
  import {
2
- createProviderToolFactoryWithOutputSchema,
2
+ createProviderExecutedToolFactory,
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
@@ -46,7 +46,7 @@ const webSearch_20250305InputSchema = lazySchema(() =>
46
46
  ),
47
47
  );
48
48
 
49
- const factory = createProviderToolFactoryWithOutputSchema<
49
+ const factory = createProviderExecutedToolFactory<
50
50
  {
51
51
  /**
52
52
  * The search query to execute.
@@ -1,5 +1,5 @@
1
1
  import {
2
- createProviderToolFactoryWithOutputSchema,
2
+ createProviderExecutedToolFactory,
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
@@ -46,7 +46,7 @@ const webSearch_20260209InputSchema = lazySchema(() =>
46
46
  ),
47
47
  );
48
48
 
49
- const factory = createProviderToolFactoryWithOutputSchema<
49
+ const factory = createProviderExecutedToolFactory<
50
50
  {
51
51
  /**
52
52
  * The search query to execute.