@ai-sdk/anthropic 2.0.0-beta.3 → 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({
@@ -924,11 +931,7 @@ var AnthropicMessagesLanguageModel = class {
924
931
  tool_choice: anthropicToolChoice
925
932
  },
926
933
  warnings: [...warnings, ...toolWarnings],
927
- betas: /* @__PURE__ */ new Set([
928
- "fine-grained-tool-streaming-2025-05-14",
929
- ...messagesBetas,
930
- ...toolsBetas
931
- ]),
934
+ betas: /* @__PURE__ */ new Set([...messagesBetas, ...toolsBetas]),
932
935
  usesJsonResponseTool: jsonResponseTool != null
933
936
  };
934
937
  }
@@ -1765,6 +1768,23 @@ var textEditor_20250124 = createProviderDefinedToolFactory6({
1765
1768
  })
1766
1769
  });
1767
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
+
1768
1788
  // src/anthropic-tools.ts
1769
1789
  var anthropicTools = {
1770
1790
  /**
@@ -1791,6 +1811,11 @@ var anthropicTools = {
1791
1811
  * Creates a tool for editing text. Must have name "str_replace_editor".
1792
1812
  */
1793
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,
1794
1819
  /**
1795
1820
  * Creates a tool for executing actions on a computer. Must have name "computer".
1796
1821
  *