@ai-sdk/anthropic 3.0.72 → 3.0.73

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.
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(index_exports);
28
28
 
29
29
  // src/anthropic-messages-language-model.ts
30
30
  var import_provider3 = require("@ai-sdk/provider");
31
- var import_provider_utils15 = require("@ai-sdk/provider-utils");
31
+ var import_provider_utils14 = require("@ai-sdk/provider-utils");
32
32
 
33
33
  // src/anthropic-error.ts
34
34
  var import_provider_utils = require("@ai-sdk/provider-utils");
@@ -1054,16 +1054,15 @@ var CacheControlValidator = class {
1054
1054
  // src/tool/text-editor_20250728.ts
1055
1055
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
1056
1056
  var import_v44 = require("zod/v4");
1057
- var import_provider_utils4 = require("@ai-sdk/provider-utils");
1058
- var textEditor_20250728ArgsSchema = (0, import_provider_utils4.lazySchema)(
1059
- () => (0, import_provider_utils4.zodSchema)(
1057
+ var textEditor_20250728ArgsSchema = (0, import_provider_utils3.lazySchema)(
1058
+ () => (0, import_provider_utils3.zodSchema)(
1060
1059
  import_v44.z.object({
1061
1060
  maxCharacters: import_v44.z.number().optional()
1062
1061
  })
1063
1062
  )
1064
1063
  );
1065
- var textEditor_20250728InputSchema = (0, import_provider_utils4.lazySchema)(
1066
- () => (0, import_provider_utils4.zodSchema)(
1064
+ var textEditor_20250728InputSchema = (0, import_provider_utils3.lazySchema)(
1065
+ () => (0, import_provider_utils3.zodSchema)(
1067
1066
  import_v44.z.object({
1068
1067
  command: import_v44.z.enum(["view", "create", "str_replace", "insert"]),
1069
1068
  path: import_v44.z.string(),
@@ -1085,10 +1084,10 @@ var textEditor_20250728 = (args = {}) => {
1085
1084
  };
1086
1085
 
1087
1086
  // src/tool/web-search_20260209.ts
1088
- var import_provider_utils5 = require("@ai-sdk/provider-utils");
1087
+ var import_provider_utils4 = require("@ai-sdk/provider-utils");
1089
1088
  var import_v45 = require("zod/v4");
1090
- var webSearch_20260209ArgsSchema = (0, import_provider_utils5.lazySchema)(
1091
- () => (0, import_provider_utils5.zodSchema)(
1089
+ var webSearch_20260209ArgsSchema = (0, import_provider_utils4.lazySchema)(
1090
+ () => (0, import_provider_utils4.zodSchema)(
1092
1091
  import_v45.z.object({
1093
1092
  maxUses: import_v45.z.number().optional(),
1094
1093
  allowedDomains: import_v45.z.array(import_v45.z.string()).optional(),
@@ -1103,8 +1102,8 @@ var webSearch_20260209ArgsSchema = (0, import_provider_utils5.lazySchema)(
1103
1102
  })
1104
1103
  )
1105
1104
  );
1106
- var webSearch_20260209OutputSchema = (0, import_provider_utils5.lazySchema)(
1107
- () => (0, import_provider_utils5.zodSchema)(
1105
+ var webSearch_20260209OutputSchema = (0, import_provider_utils4.lazySchema)(
1106
+ () => (0, import_provider_utils4.zodSchema)(
1108
1107
  import_v45.z.array(
1109
1108
  import_v45.z.object({
1110
1109
  url: import_v45.z.string(),
@@ -1116,14 +1115,14 @@ var webSearch_20260209OutputSchema = (0, import_provider_utils5.lazySchema)(
1116
1115
  )
1117
1116
  )
1118
1117
  );
1119
- var webSearch_20260209InputSchema = (0, import_provider_utils5.lazySchema)(
1120
- () => (0, import_provider_utils5.zodSchema)(
1118
+ var webSearch_20260209InputSchema = (0, import_provider_utils4.lazySchema)(
1119
+ () => (0, import_provider_utils4.zodSchema)(
1121
1120
  import_v45.z.object({
1122
1121
  query: import_v45.z.string()
1123
1122
  })
1124
1123
  )
1125
1124
  );
1126
- var factory2 = (0, import_provider_utils5.createProviderToolFactoryWithOutputSchema)({
1125
+ var factory2 = (0, import_provider_utils4.createProviderToolFactoryWithOutputSchema)({
1127
1126
  id: "anthropic.web_search_20260209",
1128
1127
  inputSchema: webSearch_20260209InputSchema,
1129
1128
  outputSchema: webSearch_20260209OutputSchema,
@@ -1134,10 +1133,10 @@ var webSearch_20260209 = (args = {}) => {
1134
1133
  };
1135
1134
 
1136
1135
  // src/tool/web-search_20250305.ts
1137
- var import_provider_utils6 = require("@ai-sdk/provider-utils");
1136
+ var import_provider_utils5 = require("@ai-sdk/provider-utils");
1138
1137
  var import_v46 = require("zod/v4");
1139
- var webSearch_20250305ArgsSchema = (0, import_provider_utils6.lazySchema)(
1140
- () => (0, import_provider_utils6.zodSchema)(
1138
+ var webSearch_20250305ArgsSchema = (0, import_provider_utils5.lazySchema)(
1139
+ () => (0, import_provider_utils5.zodSchema)(
1141
1140
  import_v46.z.object({
1142
1141
  maxUses: import_v46.z.number().optional(),
1143
1142
  allowedDomains: import_v46.z.array(import_v46.z.string()).optional(),
@@ -1152,8 +1151,8 @@ var webSearch_20250305ArgsSchema = (0, import_provider_utils6.lazySchema)(
1152
1151
  })
1153
1152
  )
1154
1153
  );
1155
- var webSearch_20250305OutputSchema = (0, import_provider_utils6.lazySchema)(
1156
- () => (0, import_provider_utils6.zodSchema)(
1154
+ var webSearch_20250305OutputSchema = (0, import_provider_utils5.lazySchema)(
1155
+ () => (0, import_provider_utils5.zodSchema)(
1157
1156
  import_v46.z.array(
1158
1157
  import_v46.z.object({
1159
1158
  url: import_v46.z.string(),
@@ -1165,14 +1164,14 @@ var webSearch_20250305OutputSchema = (0, import_provider_utils6.lazySchema)(
1165
1164
  )
1166
1165
  )
1167
1166
  );
1168
- var webSearch_20250305InputSchema = (0, import_provider_utils6.lazySchema)(
1169
- () => (0, import_provider_utils6.zodSchema)(
1167
+ var webSearch_20250305InputSchema = (0, import_provider_utils5.lazySchema)(
1168
+ () => (0, import_provider_utils5.zodSchema)(
1170
1169
  import_v46.z.object({
1171
1170
  query: import_v46.z.string()
1172
1171
  })
1173
1172
  )
1174
1173
  );
1175
- var factory3 = (0, import_provider_utils6.createProviderToolFactoryWithOutputSchema)({
1174
+ var factory3 = (0, import_provider_utils5.createProviderToolFactoryWithOutputSchema)({
1176
1175
  id: "anthropic.web_search_20250305",
1177
1176
  inputSchema: webSearch_20250305InputSchema,
1178
1177
  outputSchema: webSearch_20250305OutputSchema,
@@ -1183,10 +1182,10 @@ var webSearch_20250305 = (args = {}) => {
1183
1182
  };
1184
1183
 
1185
1184
  // src/tool/web-fetch-20260209.ts
1186
- var import_provider_utils7 = require("@ai-sdk/provider-utils");
1185
+ var import_provider_utils6 = require("@ai-sdk/provider-utils");
1187
1186
  var import_v47 = require("zod/v4");
1188
- var webFetch_20260209ArgsSchema = (0, import_provider_utils7.lazySchema)(
1189
- () => (0, import_provider_utils7.zodSchema)(
1187
+ var webFetch_20260209ArgsSchema = (0, import_provider_utils6.lazySchema)(
1188
+ () => (0, import_provider_utils6.zodSchema)(
1190
1189
  import_v47.z.object({
1191
1190
  maxUses: import_v47.z.number().optional(),
1192
1191
  allowedDomains: import_v47.z.array(import_v47.z.string()).optional(),
@@ -1196,8 +1195,8 @@ var webFetch_20260209ArgsSchema = (0, import_provider_utils7.lazySchema)(
1196
1195
  })
1197
1196
  )
1198
1197
  );
1199
- var webFetch_20260209OutputSchema = (0, import_provider_utils7.lazySchema)(
1200
- () => (0, import_provider_utils7.zodSchema)(
1198
+ var webFetch_20260209OutputSchema = (0, import_provider_utils6.lazySchema)(
1199
+ () => (0, import_provider_utils6.zodSchema)(
1201
1200
  import_v47.z.object({
1202
1201
  type: import_v47.z.literal("web_fetch_result"),
1203
1202
  url: import_v47.z.string(),
@@ -1222,14 +1221,14 @@ var webFetch_20260209OutputSchema = (0, import_provider_utils7.lazySchema)(
1222
1221
  })
1223
1222
  )
1224
1223
  );
1225
- var webFetch_20260209InputSchema = (0, import_provider_utils7.lazySchema)(
1226
- () => (0, import_provider_utils7.zodSchema)(
1224
+ var webFetch_20260209InputSchema = (0, import_provider_utils6.lazySchema)(
1225
+ () => (0, import_provider_utils6.zodSchema)(
1227
1226
  import_v47.z.object({
1228
1227
  url: import_v47.z.string()
1229
1228
  })
1230
1229
  )
1231
1230
  );
1232
- var factory4 = (0, import_provider_utils7.createProviderToolFactoryWithOutputSchema)({
1231
+ var factory4 = (0, import_provider_utils6.createProviderToolFactoryWithOutputSchema)({
1233
1232
  id: "anthropic.web_fetch_20260209",
1234
1233
  inputSchema: webFetch_20260209InputSchema,
1235
1234
  outputSchema: webFetch_20260209OutputSchema,
@@ -1240,10 +1239,10 @@ var webFetch_20260209 = (args = {}) => {
1240
1239
  };
1241
1240
 
1242
1241
  // src/tool/web-fetch-20250910.ts
1243
- var import_provider_utils8 = require("@ai-sdk/provider-utils");
1242
+ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1244
1243
  var import_v48 = require("zod/v4");
1245
- var webFetch_20250910ArgsSchema = (0, import_provider_utils8.lazySchema)(
1246
- () => (0, import_provider_utils8.zodSchema)(
1244
+ var webFetch_20250910ArgsSchema = (0, import_provider_utils7.lazySchema)(
1245
+ () => (0, import_provider_utils7.zodSchema)(
1247
1246
  import_v48.z.object({
1248
1247
  maxUses: import_v48.z.number().optional(),
1249
1248
  allowedDomains: import_v48.z.array(import_v48.z.string()).optional(),
@@ -1253,8 +1252,8 @@ var webFetch_20250910ArgsSchema = (0, import_provider_utils8.lazySchema)(
1253
1252
  })
1254
1253
  )
1255
1254
  );
1256
- var webFetch_20250910OutputSchema = (0, import_provider_utils8.lazySchema)(
1257
- () => (0, import_provider_utils8.zodSchema)(
1255
+ var webFetch_20250910OutputSchema = (0, import_provider_utils7.lazySchema)(
1256
+ () => (0, import_provider_utils7.zodSchema)(
1258
1257
  import_v48.z.object({
1259
1258
  type: import_v48.z.literal("web_fetch_result"),
1260
1259
  url: import_v48.z.string(),
@@ -1279,14 +1278,14 @@ var webFetch_20250910OutputSchema = (0, import_provider_utils8.lazySchema)(
1279
1278
  })
1280
1279
  )
1281
1280
  );
1282
- var webFetch_20250910InputSchema = (0, import_provider_utils8.lazySchema)(
1283
- () => (0, import_provider_utils8.zodSchema)(
1281
+ var webFetch_20250910InputSchema = (0, import_provider_utils7.lazySchema)(
1282
+ () => (0, import_provider_utils7.zodSchema)(
1284
1283
  import_v48.z.object({
1285
1284
  url: import_v48.z.string()
1286
1285
  })
1287
1286
  )
1288
1287
  );
1289
- var factory5 = (0, import_provider_utils8.createProviderToolFactoryWithOutputSchema)({
1288
+ var factory5 = (0, import_provider_utils7.createProviderToolFactoryWithOutputSchema)({
1290
1289
  id: "anthropic.web_fetch_20250910",
1291
1290
  inputSchema: webFetch_20250910InputSchema,
1292
1291
  outputSchema: webFetch_20250910OutputSchema,
@@ -1297,7 +1296,7 @@ var webFetch_20250910 = (args = {}) => {
1297
1296
  };
1298
1297
 
1299
1298
  // src/anthropic-prepare-tools.ts
1300
- var import_provider_utils9 = require("@ai-sdk/provider-utils");
1299
+ var import_provider_utils8 = require("@ai-sdk/provider-utils");
1301
1300
  async function prepareTools({
1302
1301
  tools,
1303
1302
  toolChoice,
@@ -1448,7 +1447,7 @@ async function prepareTools({
1448
1447
  break;
1449
1448
  }
1450
1449
  case "anthropic.text_editor_20250728": {
1451
- const args = await (0, import_provider_utils9.validateTypes)({
1450
+ const args = await (0, import_provider_utils8.validateTypes)({
1452
1451
  value: tool.args,
1453
1452
  schema: textEditor_20250728ArgsSchema
1454
1453
  });
@@ -1488,7 +1487,7 @@ async function prepareTools({
1488
1487
  }
1489
1488
  case "anthropic.web_fetch_20250910": {
1490
1489
  betas.add("web-fetch-2025-09-10");
1491
- const args = await (0, import_provider_utils9.validateTypes)({
1490
+ const args = await (0, import_provider_utils8.validateTypes)({
1492
1491
  value: tool.args,
1493
1492
  schema: webFetch_20250910ArgsSchema
1494
1493
  });
@@ -1506,7 +1505,7 @@ async function prepareTools({
1506
1505
  }
1507
1506
  case "anthropic.web_fetch_20260209": {
1508
1507
  betas.add("code-execution-web-tools-2026-02-09");
1509
- const args = await (0, import_provider_utils9.validateTypes)({
1508
+ const args = await (0, import_provider_utils8.validateTypes)({
1510
1509
  value: tool.args,
1511
1510
  schema: webFetch_20260209ArgsSchema
1512
1511
  });
@@ -1523,7 +1522,7 @@ async function prepareTools({
1523
1522
  break;
1524
1523
  }
1525
1524
  case "anthropic.web_search_20250305": {
1526
- const args = await (0, import_provider_utils9.validateTypes)({
1525
+ const args = await (0, import_provider_utils8.validateTypes)({
1527
1526
  value: tool.args,
1528
1527
  schema: webSearch_20250305ArgsSchema
1529
1528
  });
@@ -1540,7 +1539,7 @@ async function prepareTools({
1540
1539
  }
1541
1540
  case "anthropic.web_search_20260209": {
1542
1541
  betas.add("code-execution-web-tools-2026-02-09");
1543
- const args = await (0, import_provider_utils9.validateTypes)({
1542
+ const args = await (0, import_provider_utils8.validateTypes)({
1544
1543
  value: tool.args,
1545
1544
  schema: webSearch_20260209ArgsSchema
1546
1545
  });
@@ -1682,13 +1681,13 @@ function convertAnthropicMessagesUsage({
1682
1681
 
1683
1682
  // src/convert-to-anthropic-messages-prompt.ts
1684
1683
  var import_provider2 = require("@ai-sdk/provider");
1685
- var import_provider_utils14 = require("@ai-sdk/provider-utils");
1684
+ var import_provider_utils13 = require("@ai-sdk/provider-utils");
1686
1685
 
1687
1686
  // src/tool/code-execution_20250522.ts
1688
- var import_provider_utils10 = require("@ai-sdk/provider-utils");
1687
+ var import_provider_utils9 = require("@ai-sdk/provider-utils");
1689
1688
  var import_v49 = require("zod/v4");
1690
- var codeExecution_20250522OutputSchema = (0, import_provider_utils10.lazySchema)(
1691
- () => (0, import_provider_utils10.zodSchema)(
1689
+ var codeExecution_20250522OutputSchema = (0, import_provider_utils9.lazySchema)(
1690
+ () => (0, import_provider_utils9.zodSchema)(
1692
1691
  import_v49.z.object({
1693
1692
  type: import_v49.z.literal("code_execution_result"),
1694
1693
  stdout: import_v49.z.string(),
@@ -1703,14 +1702,14 @@ var codeExecution_20250522OutputSchema = (0, import_provider_utils10.lazySchema)
1703
1702
  })
1704
1703
  )
1705
1704
  );
1706
- var codeExecution_20250522InputSchema = (0, import_provider_utils10.lazySchema)(
1707
- () => (0, import_provider_utils10.zodSchema)(
1705
+ var codeExecution_20250522InputSchema = (0, import_provider_utils9.lazySchema)(
1706
+ () => (0, import_provider_utils9.zodSchema)(
1708
1707
  import_v49.z.object({
1709
1708
  code: import_v49.z.string()
1710
1709
  })
1711
1710
  )
1712
1711
  );
1713
- var factory6 = (0, import_provider_utils10.createProviderToolFactoryWithOutputSchema)({
1712
+ var factory6 = (0, import_provider_utils9.createProviderToolFactoryWithOutputSchema)({
1714
1713
  id: "anthropic.code_execution_20250522",
1715
1714
  inputSchema: codeExecution_20250522InputSchema,
1716
1715
  outputSchema: codeExecution_20250522OutputSchema
@@ -1720,10 +1719,10 @@ var codeExecution_20250522 = (args = {}) => {
1720
1719
  };
1721
1720
 
1722
1721
  // src/tool/code-execution_20250825.ts
1723
- var import_provider_utils11 = require("@ai-sdk/provider-utils");
1722
+ var import_provider_utils10 = require("@ai-sdk/provider-utils");
1724
1723
  var import_v410 = require("zod/v4");
1725
- var codeExecution_20250825OutputSchema = (0, import_provider_utils11.lazySchema)(
1726
- () => (0, import_provider_utils11.zodSchema)(
1724
+ var codeExecution_20250825OutputSchema = (0, import_provider_utils10.lazySchema)(
1725
+ () => (0, import_provider_utils10.zodSchema)(
1727
1726
  import_v410.z.discriminatedUnion("type", [
1728
1727
  import_v410.z.object({
1729
1728
  type: import_v410.z.literal("code_execution_result"),
@@ -1780,8 +1779,8 @@ var codeExecution_20250825OutputSchema = (0, import_provider_utils11.lazySchema)
1780
1779
  ])
1781
1780
  )
1782
1781
  );
1783
- var codeExecution_20250825InputSchema = (0, import_provider_utils11.lazySchema)(
1784
- () => (0, import_provider_utils11.zodSchema)(
1782
+ var codeExecution_20250825InputSchema = (0, import_provider_utils10.lazySchema)(
1783
+ () => (0, import_provider_utils10.zodSchema)(
1785
1784
  import_v410.z.discriminatedUnion("type", [
1786
1785
  // Programmatic tool calling format (mapped from { code } by AI SDK)
1787
1786
  import_v410.z.object({
@@ -1815,7 +1814,7 @@ var codeExecution_20250825InputSchema = (0, import_provider_utils11.lazySchema)(
1815
1814
  ])
1816
1815
  )
1817
1816
  );
1818
- var factory7 = (0, import_provider_utils11.createProviderToolFactoryWithOutputSchema)({
1817
+ var factory7 = (0, import_provider_utils10.createProviderToolFactoryWithOutputSchema)({
1819
1818
  id: "anthropic.code_execution_20250825",
1820
1819
  inputSchema: codeExecution_20250825InputSchema,
1821
1820
  outputSchema: codeExecution_20250825OutputSchema,
@@ -1829,10 +1828,10 @@ var codeExecution_20250825 = (args = {}) => {
1829
1828
  };
1830
1829
 
1831
1830
  // src/tool/code-execution_20260120.ts
1832
- var import_provider_utils12 = require("@ai-sdk/provider-utils");
1831
+ var import_provider_utils11 = require("@ai-sdk/provider-utils");
1833
1832
  var import_v411 = require("zod/v4");
1834
- var codeExecution_20260120OutputSchema = (0, import_provider_utils12.lazySchema)(
1835
- () => (0, import_provider_utils12.zodSchema)(
1833
+ var codeExecution_20260120OutputSchema = (0, import_provider_utils11.lazySchema)(
1834
+ () => (0, import_provider_utils11.zodSchema)(
1836
1835
  import_v411.z.discriminatedUnion("type", [
1837
1836
  import_v411.z.object({
1838
1837
  type: import_v411.z.literal("code_execution_result"),
@@ -1901,8 +1900,8 @@ var codeExecution_20260120OutputSchema = (0, import_provider_utils12.lazySchema)
1901
1900
  ])
1902
1901
  )
1903
1902
  );
1904
- var codeExecution_20260120InputSchema = (0, import_provider_utils12.lazySchema)(
1905
- () => (0, import_provider_utils12.zodSchema)(
1903
+ var codeExecution_20260120InputSchema = (0, import_provider_utils11.lazySchema)(
1904
+ () => (0, import_provider_utils11.zodSchema)(
1906
1905
  import_v411.z.discriminatedUnion("type", [
1907
1906
  import_v411.z.object({
1908
1907
  type: import_v411.z.literal("programmatic-tool-call"),
@@ -1935,7 +1934,7 @@ var codeExecution_20260120InputSchema = (0, import_provider_utils12.lazySchema)(
1935
1934
  ])
1936
1935
  )
1937
1936
  );
1938
- var factory8 = (0, import_provider_utils12.createProviderToolFactoryWithOutputSchema)({
1937
+ var factory8 = (0, import_provider_utils11.createProviderToolFactoryWithOutputSchema)({
1939
1938
  id: "anthropic.code_execution_20260120",
1940
1939
  inputSchema: codeExecution_20260120InputSchema,
1941
1940
  outputSchema: codeExecution_20260120OutputSchema,
@@ -1946,10 +1945,10 @@ var codeExecution_20260120 = (args = {}) => {
1946
1945
  };
1947
1946
 
1948
1947
  // src/tool/tool-search-regex_20251119.ts
1949
- var import_provider_utils13 = require("@ai-sdk/provider-utils");
1948
+ var import_provider_utils12 = require("@ai-sdk/provider-utils");
1950
1949
  var import_v412 = require("zod/v4");
1951
- var toolSearchRegex_20251119OutputSchema = (0, import_provider_utils13.lazySchema)(
1952
- () => (0, import_provider_utils13.zodSchema)(
1950
+ var toolSearchRegex_20251119OutputSchema = (0, import_provider_utils12.lazySchema)(
1951
+ () => (0, import_provider_utils12.zodSchema)(
1953
1952
  import_v412.z.array(
1954
1953
  import_v412.z.object({
1955
1954
  type: import_v412.z.literal("tool_reference"),
@@ -1958,8 +1957,8 @@ var toolSearchRegex_20251119OutputSchema = (0, import_provider_utils13.lazySchem
1958
1957
  )
1959
1958
  )
1960
1959
  );
1961
- var toolSearchRegex_20251119InputSchema = (0, import_provider_utils13.lazySchema)(
1962
- () => (0, import_provider_utils13.zodSchema)(
1960
+ var toolSearchRegex_20251119InputSchema = (0, import_provider_utils12.lazySchema)(
1961
+ () => (0, import_provider_utils12.zodSchema)(
1963
1962
  import_v412.z.object({
1964
1963
  /**
1965
1964
  * A regex pattern to search for tools.
@@ -1979,7 +1978,7 @@ var toolSearchRegex_20251119InputSchema = (0, import_provider_utils13.lazySchema
1979
1978
  })
1980
1979
  )
1981
1980
  );
1982
- var factory9 = (0, import_provider_utils13.createProviderToolFactoryWithOutputSchema)({
1981
+ var factory9 = (0, import_provider_utils12.createProviderToolFactoryWithOutputSchema)({
1983
1982
  id: "anthropic.tool_search_regex_20251119",
1984
1983
  inputSchema: toolSearchRegex_20251119InputSchema,
1985
1984
  outputSchema: toolSearchRegex_20251119OutputSchema,
@@ -1992,7 +1991,7 @@ var toolSearchRegex_20251119 = (args = {}) => {
1992
1991
  // src/convert-to-anthropic-messages-prompt.ts
1993
1992
  function convertToString(data) {
1994
1993
  if (typeof data === "string") {
1995
- return new TextDecoder().decode((0, import_provider_utils14.convertBase64ToUint8Array)(data));
1994
+ return new TextDecoder().decode((0, import_provider_utils13.convertBase64ToUint8Array)(data));
1996
1995
  }
1997
1996
  if (data instanceof Uint8Array) {
1998
1997
  return new TextDecoder().decode(data);
@@ -2030,7 +2029,7 @@ async function convertToAnthropicMessagesPrompt({
2030
2029
  const messages = [];
2031
2030
  async function shouldEnableCitations(providerMetadata) {
2032
2031
  var _a2, _b2;
2033
- const anthropicOptions = await (0, import_provider_utils14.parseProviderOptions)({
2032
+ const anthropicOptions = await (0, import_provider_utils13.parseProviderOptions)({
2034
2033
  provider: "anthropic",
2035
2034
  providerOptions: providerMetadata,
2036
2035
  schema: anthropicFilePartProviderOptions
@@ -2038,7 +2037,7 @@ async function convertToAnthropicMessagesPrompt({
2038
2037
  return (_b2 = (_a2 = anthropicOptions == null ? void 0 : anthropicOptions.citations) == null ? void 0 : _a2.enabled) != null ? _b2 : false;
2039
2038
  }
2040
2039
  async function getDocumentMetadata(providerMetadata) {
2041
- const anthropicOptions = await (0, import_provider_utils14.parseProviderOptions)({
2040
+ const anthropicOptions = await (0, import_provider_utils13.parseProviderOptions)({
2042
2041
  provider: "anthropic",
2043
2042
  providerOptions: providerMetadata,
2044
2043
  schema: anthropicFilePartProviderOptions
@@ -2104,7 +2103,7 @@ async function convertToAnthropicMessagesPrompt({
2104
2103
  } : {
2105
2104
  type: "base64",
2106
2105
  media_type: part.mediaType === "image/*" ? "image/jpeg" : part.mediaType,
2107
- data: (0, import_provider_utils14.convertToBase64)(part.data)
2106
+ data: (0, import_provider_utils13.convertToBase64)(part.data)
2108
2107
  },
2109
2108
  cache_control: cacheControl
2110
2109
  });
@@ -2124,7 +2123,7 @@ async function convertToAnthropicMessagesPrompt({
2124
2123
  } : {
2125
2124
  type: "base64",
2126
2125
  media_type: "application/pdf",
2127
- data: (0, import_provider_utils14.convertToBase64)(part.data)
2126
+ data: (0, import_provider_utils13.convertToBase64)(part.data)
2128
2127
  },
2129
2128
  title: (_b = metadata.title) != null ? _b : part.filename,
2130
2129
  ...metadata.context && { context: metadata.context },
@@ -2262,7 +2261,7 @@ async function convertToAnthropicMessagesPrompt({
2262
2261
  return void 0;
2263
2262
  }
2264
2263
  }
2265
- }).filter(import_provider_utils14.isNonNullable);
2264
+ }).filter(import_provider_utils13.isNonNullable);
2266
2265
  break;
2267
2266
  case "text":
2268
2267
  case "error-text":
@@ -2338,7 +2337,7 @@ async function convertToAnthropicMessagesPrompt({
2338
2337
  }
2339
2338
  case "reasoning": {
2340
2339
  if (sendReasoning) {
2341
- const reasoningMetadata = await (0, import_provider_utils14.parseProviderOptions)({
2340
+ const reasoningMetadata = await (0, import_provider_utils13.parseProviderOptions)({
2342
2341
  provider: "anthropic",
2343
2342
  providerOptions: part.providerOptions,
2344
2343
  schema: anthropicReasoningMetadataSchema
@@ -2544,7 +2543,7 @@ async function convertToAnthropicMessagesPrompt({
2544
2543
  break;
2545
2544
  }
2546
2545
  if (output.value.type === "code_execution_result") {
2547
- const codeExecutionOutput = await (0, import_provider_utils14.validateTypes)({
2546
+ const codeExecutionOutput = await (0, import_provider_utils13.validateTypes)({
2548
2547
  value: output.value,
2549
2548
  schema: codeExecution_20250522OutputSchema
2550
2549
  });
@@ -2561,7 +2560,7 @@ async function convertToAnthropicMessagesPrompt({
2561
2560
  cache_control: cacheControl
2562
2561
  });
2563
2562
  } else if (output.value.type === "encrypted_code_execution_result") {
2564
- const codeExecutionOutput = await (0, import_provider_utils14.validateTypes)({
2563
+ const codeExecutionOutput = await (0, import_provider_utils13.validateTypes)({
2565
2564
  value: output.value,
2566
2565
  schema: codeExecution_20260120OutputSchema
2567
2566
  });
@@ -2580,7 +2579,7 @@ async function convertToAnthropicMessagesPrompt({
2580
2579
  });
2581
2580
  }
2582
2581
  } else {
2583
- const codeExecutionOutput = await (0, import_provider_utils14.validateTypes)({
2582
+ const codeExecutionOutput = await (0, import_provider_utils13.validateTypes)({
2584
2583
  value: output.value,
2585
2584
  schema: codeExecution_20250825OutputSchema
2586
2585
  });
@@ -2649,7 +2648,7 @@ async function convertToAnthropicMessagesPrompt({
2649
2648
  });
2650
2649
  break;
2651
2650
  }
2652
- const webFetchOutput = await (0, import_provider_utils14.validateTypes)({
2651
+ const webFetchOutput = await (0, import_provider_utils13.validateTypes)({
2653
2652
  value: output.value,
2654
2653
  schema: webFetch_20250910OutputSchema
2655
2654
  });
@@ -2684,7 +2683,7 @@ async function convertToAnthropicMessagesPrompt({
2684
2683
  });
2685
2684
  break;
2686
2685
  }
2687
- const webSearchOutput = await (0, import_provider_utils14.validateTypes)({
2686
+ const webSearchOutput = await (0, import_provider_utils13.validateTypes)({
2688
2687
  value: output.value,
2689
2688
  schema: webSearch_20250305OutputSchema
2690
2689
  });
@@ -2711,7 +2710,7 @@ async function convertToAnthropicMessagesPrompt({
2711
2710
  });
2712
2711
  break;
2713
2712
  }
2714
- const toolSearchOutput = await (0, import_provider_utils14.validateTypes)({
2713
+ const toolSearchOutput = await (0, import_provider_utils13.validateTypes)({
2715
2714
  value: output.value,
2716
2715
  schema: toolSearchRegex_20251119OutputSchema
2717
2716
  });
@@ -2824,6 +2823,152 @@ function mapAnthropicStopReason({
2824
2823
  }
2825
2824
  }
2826
2825
 
2826
+ // src/sanitize-json-schema.ts
2827
+ var SUPPORTED_STRING_FORMATS = /* @__PURE__ */ new Set([
2828
+ "date-time",
2829
+ "time",
2830
+ "date",
2831
+ "duration",
2832
+ "email",
2833
+ "hostname",
2834
+ "uri",
2835
+ "ipv4",
2836
+ "ipv6",
2837
+ "uuid"
2838
+ ]);
2839
+ var DESCRIPTION_CONSTRAINT_KEYS = [
2840
+ "minimum",
2841
+ "maximum",
2842
+ "exclusiveMinimum",
2843
+ "exclusiveMaximum",
2844
+ "multipleOf",
2845
+ "minLength",
2846
+ "maxLength",
2847
+ "pattern",
2848
+ "minItems",
2849
+ "maxItems",
2850
+ "uniqueItems",
2851
+ "minProperties",
2852
+ "maxProperties",
2853
+ "not"
2854
+ ];
2855
+ function sanitizeJsonSchema(schema) {
2856
+ return sanitizeSchema(schema);
2857
+ }
2858
+ function sanitizeDefinition(definition) {
2859
+ if (typeof definition === "boolean" || !isPlainObject(definition)) {
2860
+ return definition;
2861
+ }
2862
+ return sanitizeSchema(definition);
2863
+ }
2864
+ function sanitizeSchema(schema) {
2865
+ const result = {};
2866
+ const schemaWithDefs = schema;
2867
+ if (schema.$ref != null) {
2868
+ return { $ref: schema.$ref };
2869
+ }
2870
+ if (schema.$schema != null) {
2871
+ result.$schema = schema.$schema;
2872
+ }
2873
+ if (schema.$id != null) {
2874
+ result.$id = schema.$id;
2875
+ }
2876
+ if (schema.title != null) {
2877
+ result.title = schema.title;
2878
+ }
2879
+ if (schema.description != null) {
2880
+ result.description = schema.description;
2881
+ }
2882
+ if (schema.default !== void 0) {
2883
+ result.default = schema.default;
2884
+ }
2885
+ if (schema.const !== void 0) {
2886
+ result.const = schema.const;
2887
+ }
2888
+ if (schema.enum != null) {
2889
+ result.enum = schema.enum;
2890
+ }
2891
+ if (schema.type != null) {
2892
+ result.type = schema.type;
2893
+ }
2894
+ if (schema.anyOf != null) {
2895
+ result.anyOf = schema.anyOf.map(sanitizeDefinition);
2896
+ } else if (schema.oneOf != null) {
2897
+ result.anyOf = schema.oneOf.map(sanitizeDefinition);
2898
+ }
2899
+ if (schema.allOf != null) {
2900
+ result.allOf = schema.allOf.map(sanitizeDefinition);
2901
+ }
2902
+ if (schema.definitions != null) {
2903
+ result.definitions = Object.fromEntries(
2904
+ Object.entries(schema.definitions).map(([name, definition]) => [
2905
+ name,
2906
+ sanitizeDefinition(definition)
2907
+ ])
2908
+ );
2909
+ }
2910
+ if (schemaWithDefs.$defs != null) {
2911
+ const resultWithDefs = result;
2912
+ resultWithDefs.$defs = Object.fromEntries(
2913
+ Object.entries(schemaWithDefs.$defs).map(([name, definition]) => [
2914
+ name,
2915
+ sanitizeDefinition(definition)
2916
+ ])
2917
+ );
2918
+ }
2919
+ if (schema.type === "object" || schema.properties != null) {
2920
+ if (schema.properties != null) {
2921
+ result.properties = Object.fromEntries(
2922
+ Object.entries(schema.properties).map(([name, definition]) => [
2923
+ name,
2924
+ sanitizeDefinition(definition)
2925
+ ])
2926
+ );
2927
+ }
2928
+ result.additionalProperties = false;
2929
+ if (schema.required != null) {
2930
+ result.required = schema.required;
2931
+ }
2932
+ }
2933
+ if (schema.items != null) {
2934
+ result.items = Array.isArray(schema.items) ? schema.items.map(sanitizeDefinition) : sanitizeDefinition(schema.items);
2935
+ }
2936
+ if (typeof schema.format === "string" && SUPPORTED_STRING_FORMATS.has(schema.format)) {
2937
+ result.format = schema.format;
2938
+ }
2939
+ const constraintDescription = getConstraintDescription(schema);
2940
+ if (constraintDescription != null) {
2941
+ result.description = result.description == null ? constraintDescription : `${result.description}
2942
+ ${constraintDescription}`;
2943
+ }
2944
+ return result;
2945
+ }
2946
+ function getConstraintDescription(schema) {
2947
+ const descriptions = DESCRIPTION_CONSTRAINT_KEYS.flatMap((key) => {
2948
+ const value = schema[key];
2949
+ if (value == null || value === false) {
2950
+ return [];
2951
+ }
2952
+ return `${formatConstraintName(key)}: ${formatConstraintValue(value)}`;
2953
+ });
2954
+ if (typeof schema.format === "string" && !SUPPORTED_STRING_FORMATS.has(schema.format)) {
2955
+ descriptions.push(`format: ${schema.format}`);
2956
+ }
2957
+ return descriptions.length === 0 ? void 0 : `${descriptions.join("; ")}.`;
2958
+ }
2959
+ function formatConstraintName(key) {
2960
+ return key.replace(/[A-Z]/g, (match) => ` ${match.toLowerCase()}`);
2961
+ }
2962
+ function formatConstraintValue(value) {
2963
+ if (typeof value === "string") {
2964
+ return value;
2965
+ }
2966
+ return JSON.stringify(value);
2967
+ }
2968
+ function isPlainObject(value) {
2969
+ return typeof value === "object" && value !== null && !Array.isArray(value);
2970
+ }
2971
+
2827
2972
  // src/anthropic-messages-language-model.ts
2828
2973
  function createCitationSource(citation, citationDocuments, generateId2) {
2829
2974
  var _a;
@@ -2875,7 +3020,7 @@ var AnthropicMessagesLanguageModel = class {
2875
3020
  var _a;
2876
3021
  this.modelId = modelId;
2877
3022
  this.config = config;
2878
- this.generateId = (_a = config.generateId) != null ? _a : import_provider_utils15.generateId;
3023
+ this.generateId = (_a = config.generateId) != null ? _a : import_provider_utils14.generateId;
2879
3024
  }
2880
3025
  supportsUrl(url) {
2881
3026
  return url.protocol === "https:";
@@ -2949,12 +3094,12 @@ var AnthropicMessagesLanguageModel = class {
2949
3094
  }
2950
3095
  }
2951
3096
  const providerOptionsName = this.providerOptionsName;
2952
- const canonicalOptions = await (0, import_provider_utils15.parseProviderOptions)({
3097
+ const canonicalOptions = await (0, import_provider_utils14.parseProviderOptions)({
2953
3098
  provider: "anthropic",
2954
3099
  providerOptions,
2955
3100
  schema: anthropicLanguageModelOptions
2956
3101
  });
2957
- const customProviderOptions = providerOptionsName !== "anthropic" ? await (0, import_provider_utils15.parseProviderOptions)({
3102
+ const customProviderOptions = providerOptionsName !== "anthropic" ? await (0, import_provider_utils14.parseProviderOptions)({
2958
3103
  provider: providerOptionsName,
2959
3104
  providerOptions,
2960
3105
  schema: anthropicLanguageModelOptions
@@ -3010,7 +3155,7 @@ var AnthropicMessagesLanguageModel = class {
3010
3155
  } : void 0;
3011
3156
  const contextManagement = anthropicOptions == null ? void 0 : anthropicOptions.contextManagement;
3012
3157
  const cacheControlValidator = new CacheControlValidator();
3013
- const toolNameMapping = (0, import_provider_utils15.createToolNameMapping)({
3158
+ const toolNameMapping = (0, import_provider_utils14.createToolNameMapping)({
3014
3159
  tools,
3015
3160
  providerToolNames: {
3016
3161
  "anthropic.code_execution_20250522": "code_execution",
@@ -3079,7 +3224,7 @@ var AnthropicMessagesLanguageModel = class {
3079
3224
  ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
3080
3225
  format: {
3081
3226
  type: "json_schema",
3082
- schema: responseFormat.schema
3227
+ schema: sanitizeJsonSchema(responseFormat.schema)
3083
3228
  }
3084
3229
  }
3085
3230
  }
@@ -3320,15 +3465,15 @@ var AnthropicMessagesLanguageModel = class {
3320
3465
  betas,
3321
3466
  headers
3322
3467
  }) {
3323
- return (0, import_provider_utils15.combineHeaders)(
3324
- await (0, import_provider_utils15.resolve)(this.config.headers),
3468
+ return (0, import_provider_utils14.combineHeaders)(
3469
+ await (0, import_provider_utils14.resolve)(this.config.headers),
3325
3470
  headers,
3326
3471
  betas.size > 0 ? { "anthropic-beta": Array.from(betas).join(",") } : {}
3327
3472
  );
3328
3473
  }
3329
3474
  async getBetasFromHeaders(requestHeaders) {
3330
3475
  var _a, _b;
3331
- const configHeaders = await (0, import_provider_utils15.resolve)(this.config.headers);
3476
+ const configHeaders = await (0, import_provider_utils14.resolve)(this.config.headers);
3332
3477
  const configBetaHeader = (_a = configHeaders["anthropic-beta"]) != null ? _a : "";
3333
3478
  const requestBetaHeader = (_b = requestHeaders == null ? void 0 : requestHeaders["anthropic-beta"]) != null ? _b : "";
3334
3479
  return new Set(
@@ -3394,12 +3539,12 @@ var AnthropicMessagesLanguageModel = class {
3394
3539
  responseHeaders,
3395
3540
  value: response,
3396
3541
  rawValue: rawResponse
3397
- } = await (0, import_provider_utils15.postJsonToApi)({
3542
+ } = await (0, import_provider_utils14.postJsonToApi)({
3398
3543
  url: this.buildRequestUrl(false),
3399
3544
  headers: await this.getHeaders({ betas, headers: options.headers }),
3400
3545
  body: this.transformRequestBody(args, betas),
3401
3546
  failedResponseHandler: anthropicFailedResponseHandler,
3402
- successfulResponseHandler: (0, import_provider_utils15.createJsonResponseHandler)(
3547
+ successfulResponseHandler: (0, import_provider_utils14.createJsonResponseHandler)(
3403
3548
  anthropicMessagesResponseSchema
3404
3549
  ),
3405
3550
  abortSignal: options.abortSignal,
@@ -3814,12 +3959,12 @@ var AnthropicMessagesLanguageModel = class {
3814
3959
  body.tools
3815
3960
  );
3816
3961
  const url = this.buildRequestUrl(true);
3817
- const { responseHeaders, value: response } = await (0, import_provider_utils15.postJsonToApi)({
3962
+ const { responseHeaders, value: response } = await (0, import_provider_utils14.postJsonToApi)({
3818
3963
  url,
3819
3964
  headers: await this.getHeaders({ betas, headers: options.headers }),
3820
3965
  body: this.transformRequestBody(body, betas),
3821
3966
  failedResponseHandler: anthropicFailedResponseHandler,
3822
- successfulResponseHandler: (0, import_provider_utils15.createEventSourceResponseHandler)(
3967
+ successfulResponseHandler: (0, import_provider_utils14.createEventSourceResponseHandler)(
3823
3968
  anthropicMessagesChunkSchema
3824
3969
  ),
3825
3970
  abortSignal: options.abortSignal,
@@ -4670,42 +4815,42 @@ function mapAnthropicResponseContextManagement(contextManagement) {
4670
4815
  }
4671
4816
 
4672
4817
  // src/tool/bash_20241022.ts
4673
- var import_provider_utils16 = require("@ai-sdk/provider-utils");
4818
+ var import_provider_utils15 = require("@ai-sdk/provider-utils");
4674
4819
  var import_v413 = require("zod/v4");
4675
- var bash_20241022InputSchema = (0, import_provider_utils16.lazySchema)(
4676
- () => (0, import_provider_utils16.zodSchema)(
4820
+ var bash_20241022InputSchema = (0, import_provider_utils15.lazySchema)(
4821
+ () => (0, import_provider_utils15.zodSchema)(
4677
4822
  import_v413.z.object({
4678
4823
  command: import_v413.z.string(),
4679
4824
  restart: import_v413.z.boolean().optional()
4680
4825
  })
4681
4826
  )
4682
4827
  );
4683
- var bash_20241022 = (0, import_provider_utils16.createProviderToolFactory)({
4828
+ var bash_20241022 = (0, import_provider_utils15.createProviderToolFactory)({
4684
4829
  id: "anthropic.bash_20241022",
4685
4830
  inputSchema: bash_20241022InputSchema
4686
4831
  });
4687
4832
 
4688
4833
  // src/tool/bash_20250124.ts
4689
- var import_provider_utils17 = require("@ai-sdk/provider-utils");
4834
+ var import_provider_utils16 = require("@ai-sdk/provider-utils");
4690
4835
  var import_v414 = require("zod/v4");
4691
- var bash_20250124InputSchema = (0, import_provider_utils17.lazySchema)(
4692
- () => (0, import_provider_utils17.zodSchema)(
4836
+ var bash_20250124InputSchema = (0, import_provider_utils16.lazySchema)(
4837
+ () => (0, import_provider_utils16.zodSchema)(
4693
4838
  import_v414.z.object({
4694
4839
  command: import_v414.z.string(),
4695
4840
  restart: import_v414.z.boolean().optional()
4696
4841
  })
4697
4842
  )
4698
4843
  );
4699
- var bash_20250124 = (0, import_provider_utils17.createProviderToolFactory)({
4844
+ var bash_20250124 = (0, import_provider_utils16.createProviderToolFactory)({
4700
4845
  id: "anthropic.bash_20250124",
4701
4846
  inputSchema: bash_20250124InputSchema
4702
4847
  });
4703
4848
 
4704
4849
  // src/tool/computer_20241022.ts
4705
- var import_provider_utils18 = require("@ai-sdk/provider-utils");
4850
+ var import_provider_utils17 = require("@ai-sdk/provider-utils");
4706
4851
  var import_v415 = require("zod/v4");
4707
- var computer_20241022InputSchema = (0, import_provider_utils18.lazySchema)(
4708
- () => (0, import_provider_utils18.zodSchema)(
4852
+ var computer_20241022InputSchema = (0, import_provider_utils17.lazySchema)(
4853
+ () => (0, import_provider_utils17.zodSchema)(
4709
4854
  import_v415.z.object({
4710
4855
  action: import_v415.z.enum([
4711
4856
  "key",
@@ -4724,16 +4869,16 @@ var computer_20241022InputSchema = (0, import_provider_utils18.lazySchema)(
4724
4869
  })
4725
4870
  )
4726
4871
  );
4727
- var computer_20241022 = (0, import_provider_utils18.createProviderToolFactory)({
4872
+ var computer_20241022 = (0, import_provider_utils17.createProviderToolFactory)({
4728
4873
  id: "anthropic.computer_20241022",
4729
4874
  inputSchema: computer_20241022InputSchema
4730
4875
  });
4731
4876
 
4732
4877
  // src/tool/computer_20250124.ts
4733
- var import_provider_utils19 = require("@ai-sdk/provider-utils");
4878
+ var import_provider_utils18 = require("@ai-sdk/provider-utils");
4734
4879
  var import_v416 = require("zod/v4");
4735
- var computer_20250124InputSchema = (0, import_provider_utils19.lazySchema)(
4736
- () => (0, import_provider_utils19.zodSchema)(
4880
+ var computer_20250124InputSchema = (0, import_provider_utils18.lazySchema)(
4881
+ () => (0, import_provider_utils18.zodSchema)(
4737
4882
  import_v416.z.object({
4738
4883
  action: import_v416.z.enum([
4739
4884
  "key",
@@ -4762,16 +4907,16 @@ var computer_20250124InputSchema = (0, import_provider_utils19.lazySchema)(
4762
4907
  })
4763
4908
  )
4764
4909
  );
4765
- var computer_20250124 = (0, import_provider_utils19.createProviderToolFactory)({
4910
+ var computer_20250124 = (0, import_provider_utils18.createProviderToolFactory)({
4766
4911
  id: "anthropic.computer_20250124",
4767
4912
  inputSchema: computer_20250124InputSchema
4768
4913
  });
4769
4914
 
4770
4915
  // src/tool/computer_20251124.ts
4771
- var import_provider_utils20 = require("@ai-sdk/provider-utils");
4916
+ var import_provider_utils19 = require("@ai-sdk/provider-utils");
4772
4917
  var import_v417 = require("zod/v4");
4773
- var computer_20251124InputSchema = (0, import_provider_utils20.lazySchema)(
4774
- () => (0, import_provider_utils20.zodSchema)(
4918
+ var computer_20251124InputSchema = (0, import_provider_utils19.lazySchema)(
4919
+ () => (0, import_provider_utils19.zodSchema)(
4775
4920
  import_v417.z.object({
4776
4921
  action: import_v417.z.enum([
4777
4922
  "key",
@@ -4807,16 +4952,16 @@ var computer_20251124InputSchema = (0, import_provider_utils20.lazySchema)(
4807
4952
  })
4808
4953
  )
4809
4954
  );
4810
- var computer_20251124 = (0, import_provider_utils20.createProviderToolFactory)({
4955
+ var computer_20251124 = (0, import_provider_utils19.createProviderToolFactory)({
4811
4956
  id: "anthropic.computer_20251124",
4812
4957
  inputSchema: computer_20251124InputSchema
4813
4958
  });
4814
4959
 
4815
4960
  // src/tool/memory_20250818.ts
4816
- var import_provider_utils21 = require("@ai-sdk/provider-utils");
4961
+ var import_provider_utils20 = require("@ai-sdk/provider-utils");
4817
4962
  var import_v418 = require("zod/v4");
4818
- var memory_20250818InputSchema = (0, import_provider_utils21.lazySchema)(
4819
- () => (0, import_provider_utils21.zodSchema)(
4963
+ var memory_20250818InputSchema = (0, import_provider_utils20.lazySchema)(
4964
+ () => (0, import_provider_utils20.zodSchema)(
4820
4965
  import_v418.z.discriminatedUnion("command", [
4821
4966
  import_v418.z.object({
4822
4967
  command: import_v418.z.literal("view"),
@@ -4852,16 +4997,16 @@ var memory_20250818InputSchema = (0, import_provider_utils21.lazySchema)(
4852
4997
  ])
4853
4998
  )
4854
4999
  );
4855
- var memory_20250818 = (0, import_provider_utils21.createProviderToolFactory)({
5000
+ var memory_20250818 = (0, import_provider_utils20.createProviderToolFactory)({
4856
5001
  id: "anthropic.memory_20250818",
4857
5002
  inputSchema: memory_20250818InputSchema
4858
5003
  });
4859
5004
 
4860
5005
  // src/tool/text-editor_20241022.ts
4861
- var import_provider_utils22 = require("@ai-sdk/provider-utils");
5006
+ var import_provider_utils21 = require("@ai-sdk/provider-utils");
4862
5007
  var import_v419 = require("zod/v4");
4863
- var textEditor_20241022InputSchema = (0, import_provider_utils22.lazySchema)(
4864
- () => (0, import_provider_utils22.zodSchema)(
5008
+ var textEditor_20241022InputSchema = (0, import_provider_utils21.lazySchema)(
5009
+ () => (0, import_provider_utils21.zodSchema)(
4865
5010
  import_v419.z.object({
4866
5011
  command: import_v419.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4867
5012
  path: import_v419.z.string(),
@@ -4874,16 +5019,16 @@ var textEditor_20241022InputSchema = (0, import_provider_utils22.lazySchema)(
4874
5019
  })
4875
5020
  )
4876
5021
  );
4877
- var textEditor_20241022 = (0, import_provider_utils22.createProviderToolFactory)({
5022
+ var textEditor_20241022 = (0, import_provider_utils21.createProviderToolFactory)({
4878
5023
  id: "anthropic.text_editor_20241022",
4879
5024
  inputSchema: textEditor_20241022InputSchema
4880
5025
  });
4881
5026
 
4882
5027
  // src/tool/text-editor_20250124.ts
4883
- var import_provider_utils23 = require("@ai-sdk/provider-utils");
5028
+ var import_provider_utils22 = require("@ai-sdk/provider-utils");
4884
5029
  var import_v420 = require("zod/v4");
4885
- var textEditor_20250124InputSchema = (0, import_provider_utils23.lazySchema)(
4886
- () => (0, import_provider_utils23.zodSchema)(
5030
+ var textEditor_20250124InputSchema = (0, import_provider_utils22.lazySchema)(
5031
+ () => (0, import_provider_utils22.zodSchema)(
4887
5032
  import_v420.z.object({
4888
5033
  command: import_v420.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
4889
5034
  path: import_v420.z.string(),
@@ -4896,16 +5041,16 @@ var textEditor_20250124InputSchema = (0, import_provider_utils23.lazySchema)(
4896
5041
  })
4897
5042
  )
4898
5043
  );
4899
- var textEditor_20250124 = (0, import_provider_utils23.createProviderToolFactory)({
5044
+ var textEditor_20250124 = (0, import_provider_utils22.createProviderToolFactory)({
4900
5045
  id: "anthropic.text_editor_20250124",
4901
5046
  inputSchema: textEditor_20250124InputSchema
4902
5047
  });
4903
5048
 
4904
5049
  // src/tool/text-editor_20250429.ts
4905
- var import_provider_utils24 = require("@ai-sdk/provider-utils");
5050
+ var import_provider_utils23 = require("@ai-sdk/provider-utils");
4906
5051
  var import_v421 = require("zod/v4");
4907
- var textEditor_20250429InputSchema = (0, import_provider_utils24.lazySchema)(
4908
- () => (0, import_provider_utils24.zodSchema)(
5052
+ var textEditor_20250429InputSchema = (0, import_provider_utils23.lazySchema)(
5053
+ () => (0, import_provider_utils23.zodSchema)(
4909
5054
  import_v421.z.object({
4910
5055
  command: import_v421.z.enum(["view", "create", "str_replace", "insert"]),
4911
5056
  path: import_v421.z.string(),
@@ -4918,16 +5063,16 @@ var textEditor_20250429InputSchema = (0, import_provider_utils24.lazySchema)(
4918
5063
  })
4919
5064
  )
4920
5065
  );
4921
- var textEditor_20250429 = (0, import_provider_utils24.createProviderToolFactory)({
5066
+ var textEditor_20250429 = (0, import_provider_utils23.createProviderToolFactory)({
4922
5067
  id: "anthropic.text_editor_20250429",
4923
5068
  inputSchema: textEditor_20250429InputSchema
4924
5069
  });
4925
5070
 
4926
5071
  // src/tool/tool-search-bm25_20251119.ts
4927
- var import_provider_utils25 = require("@ai-sdk/provider-utils");
5072
+ var import_provider_utils24 = require("@ai-sdk/provider-utils");
4928
5073
  var import_v422 = require("zod/v4");
4929
- var toolSearchBm25_20251119OutputSchema = (0, import_provider_utils25.lazySchema)(
4930
- () => (0, import_provider_utils25.zodSchema)(
5074
+ var toolSearchBm25_20251119OutputSchema = (0, import_provider_utils24.lazySchema)(
5075
+ () => (0, import_provider_utils24.zodSchema)(
4931
5076
  import_v422.z.array(
4932
5077
  import_v422.z.object({
4933
5078
  type: import_v422.z.literal("tool_reference"),
@@ -4936,8 +5081,8 @@ var toolSearchBm25_20251119OutputSchema = (0, import_provider_utils25.lazySchema
4936
5081
  )
4937
5082
  )
4938
5083
  );
4939
- var toolSearchBm25_20251119InputSchema = (0, import_provider_utils25.lazySchema)(
4940
- () => (0, import_provider_utils25.zodSchema)(
5084
+ var toolSearchBm25_20251119InputSchema = (0, import_provider_utils24.lazySchema)(
5085
+ () => (0, import_provider_utils24.zodSchema)(
4941
5086
  import_v422.z.object({
4942
5087
  /**
4943
5088
  * A natural language query to search for tools.
@@ -4951,7 +5096,7 @@ var toolSearchBm25_20251119InputSchema = (0, import_provider_utils25.lazySchema)
4951
5096
  })
4952
5097
  )
4953
5098
  );
4954
- var factory10 = (0, import_provider_utils25.createProviderToolFactoryWithOutputSchema)({
5099
+ var factory10 = (0, import_provider_utils24.createProviderToolFactoryWithOutputSchema)({
4955
5100
  id: "anthropic.tool_search_bm25_20251119",
4956
5101
  inputSchema: toolSearchBm25_20251119InputSchema,
4957
5102
  outputSchema: toolSearchBm25_20251119OutputSchema,