@ai-sdk/anthropic 2.0.0-beta.4 → 2.0.0-beta.5

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.
@@ -178,6 +178,13 @@ function prepareTools({
178
178
  type: "text_editor_20241022"
179
179
  });
180
180
  break;
181
+ case "anthropic.text_editor_20250429":
182
+ betas.add("computer-use-2025-01-24");
183
+ anthropicTools2.push({
184
+ name: "str_replace_based_edit_tool",
185
+ type: "text_editor_20250429"
186
+ });
187
+ break;
181
188
  case "anthropic.bash_20250124":
182
189
  betas.add("computer-use-2025-01-24");
183
190
  anthropicTools2.push({
@@ -1761,6 +1768,23 @@ var textEditor_20250124 = createProviderDefinedToolFactory6({
1761
1768
  })
1762
1769
  });
1763
1770
 
1771
+ // src/tool/text-editor_20250429.ts
1772
+ import { createProviderDefinedToolFactory as createProviderDefinedToolFactory7 } from "@ai-sdk/provider-utils";
1773
+ import { z as z11 } from "zod/v4";
1774
+ var textEditor_20250429 = createProviderDefinedToolFactory7({
1775
+ id: "anthropic.text_editor_20250429",
1776
+ name: "str_replace_based_edit_tool",
1777
+ inputSchema: z11.object({
1778
+ command: z11.enum(["view", "create", "str_replace", "insert"]),
1779
+ path: z11.string(),
1780
+ file_text: z11.string().optional(),
1781
+ insert_line: z11.number().int().optional(),
1782
+ new_str: z11.string().optional(),
1783
+ old_str: z11.string().optional(),
1784
+ view_range: z11.array(z11.number().int()).optional()
1785
+ })
1786
+ });
1787
+
1764
1788
  // src/anthropic-tools.ts
1765
1789
  var anthropicTools = {
1766
1790
  /**
@@ -1787,6 +1811,11 @@ var anthropicTools = {
1787
1811
  * Creates a tool for editing text. Must have name "str_replace_editor".
1788
1812
  */
1789
1813
  textEditor_20250124,
1814
+ /**
1815
+ * Creates a tool for editing text. Must have name "str_replace_based_edit_tool".
1816
+ * Note: This version does not support the "undo_edit" command.
1817
+ */
1818
+ textEditor_20250429,
1790
1819
  /**
1791
1820
  * Creates a tool for executing actions on a computer. Must have name "computer".
1792
1821
  *