@anthropic-ai/sdk 0.60.0 → 0.62.0

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 (56) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/client.d.mts +2 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +8 -7
  7. package/client.js.map +1 -1
  8. package/client.mjs +7 -6
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/beta/beta.d.mts +3 -2
  12. package/resources/beta/beta.d.mts.map +1 -1
  13. package/resources/beta/beta.d.ts +3 -2
  14. package/resources/beta/beta.d.ts.map +1 -1
  15. package/resources/beta/beta.js.map +1 -1
  16. package/resources/beta/beta.mjs.map +1 -1
  17. package/resources/beta/index.d.mts +1 -1
  18. package/resources/beta/index.d.mts.map +1 -1
  19. package/resources/beta/index.d.ts +1 -1
  20. package/resources/beta/index.d.ts.map +1 -1
  21. package/resources/beta/index.js.map +1 -1
  22. package/resources/beta/index.mjs.map +1 -1
  23. package/resources/beta/messages/index.d.mts +1 -1
  24. package/resources/beta/messages/index.d.mts.map +1 -1
  25. package/resources/beta/messages/index.d.ts +1 -1
  26. package/resources/beta/messages/index.d.ts.map +1 -1
  27. package/resources/beta/messages/index.js.map +1 -1
  28. package/resources/beta/messages/index.mjs.map +1 -1
  29. package/resources/beta/messages/messages.d.mts +234 -58
  30. package/resources/beta/messages/messages.d.mts.map +1 -1
  31. package/resources/beta/messages/messages.d.ts +234 -58
  32. package/resources/beta/messages/messages.d.ts.map +1 -1
  33. package/resources/beta/messages/messages.js.map +1 -1
  34. package/resources/beta/messages/messages.mjs.map +1 -1
  35. package/resources/messages/messages.d.mts +4 -50
  36. package/resources/messages/messages.d.mts.map +1 -1
  37. package/resources/messages/messages.d.ts +4 -50
  38. package/resources/messages/messages.d.ts.map +1 -1
  39. package/resources/messages/messages.js.map +1 -1
  40. package/resources/messages/messages.mjs.map +1 -1
  41. package/resources/shared.d.mts +1 -0
  42. package/resources/shared.d.mts.map +1 -1
  43. package/resources/shared.d.ts +1 -0
  44. package/resources/shared.d.ts.map +1 -1
  45. package/src/client.ts +10 -6
  46. package/src/resources/beta/beta.ts +60 -0
  47. package/src/resources/beta/index.ts +29 -0
  48. package/src/resources/beta/messages/index.ts +29 -0
  49. package/src/resources/beta/messages/messages.ts +412 -53
  50. package/src/resources/messages/messages.ts +4 -50
  51. package/src/resources/shared.ts +2 -0
  52. package/src/version.ts +1 -1
  53. package/version.d.mts +1 -1
  54. package/version.d.ts +1 -1
  55. package/version.js +1 -1
  56. package/version.mjs +1 -1
@@ -168,6 +168,85 @@ export interface BetaBase64PDFSource {
168
168
  type: 'base64';
169
169
  }
170
170
 
171
+ export interface BetaBashCodeExecutionOutputBlock {
172
+ file_id: string;
173
+
174
+ type: 'bash_code_execution_output';
175
+ }
176
+
177
+ export interface BetaBashCodeExecutionOutputBlockParam {
178
+ file_id: string;
179
+
180
+ type: 'bash_code_execution_output';
181
+ }
182
+
183
+ export interface BetaBashCodeExecutionResultBlock {
184
+ content: Array<BetaBashCodeExecutionOutputBlock>;
185
+
186
+ return_code: number;
187
+
188
+ stderr: string;
189
+
190
+ stdout: string;
191
+
192
+ type: 'bash_code_execution_result';
193
+ }
194
+
195
+ export interface BetaBashCodeExecutionResultBlockParam {
196
+ content: Array<BetaBashCodeExecutionOutputBlockParam>;
197
+
198
+ return_code: number;
199
+
200
+ stderr: string;
201
+
202
+ stdout: string;
203
+
204
+ type: 'bash_code_execution_result';
205
+ }
206
+
207
+ export interface BetaBashCodeExecutionToolResultBlock {
208
+ content: BetaBashCodeExecutionToolResultError | BetaBashCodeExecutionResultBlock;
209
+
210
+ tool_use_id: string;
211
+
212
+ type: 'bash_code_execution_tool_result';
213
+ }
214
+
215
+ export interface BetaBashCodeExecutionToolResultBlockParam {
216
+ content: BetaBashCodeExecutionToolResultErrorParam | BetaBashCodeExecutionResultBlockParam;
217
+
218
+ tool_use_id: string;
219
+
220
+ type: 'bash_code_execution_tool_result';
221
+
222
+ /**
223
+ * Create a cache control breakpoint at this content block.
224
+ */
225
+ cache_control?: BetaCacheControlEphemeral | null;
226
+ }
227
+
228
+ export interface BetaBashCodeExecutionToolResultError {
229
+ error_code:
230
+ | 'invalid_tool_input'
231
+ | 'unavailable'
232
+ | 'too_many_requests'
233
+ | 'execution_time_exceeded'
234
+ | 'output_file_too_large';
235
+
236
+ type: 'bash_code_execution_tool_result_error';
237
+ }
238
+
239
+ export interface BetaBashCodeExecutionToolResultErrorParam {
240
+ error_code:
241
+ | 'invalid_tool_input'
242
+ | 'unavailable'
243
+ | 'too_many_requests'
244
+ | 'execution_time_exceeded'
245
+ | 'output_file_too_large';
246
+
247
+ type: 'bash_code_execution_tool_result_error';
248
+ }
249
+
171
250
  export interface BetaCacheControlEphemeral {
172
251
  type: 'ephemeral';
173
252
 
@@ -226,6 +305,10 @@ export interface BetaCitationCharLocationParam {
226
305
  type: 'char_location';
227
306
  }
228
307
 
308
+ export interface BetaCitationConfig {
309
+ enabled: boolean;
310
+ }
311
+
229
312
  export interface BetaCitationContentBlockLocation {
230
313
  cited_text: string;
231
314
 
@@ -409,6 +492,22 @@ export interface BetaCodeExecutionTool20250522 {
409
492
  cache_control?: BetaCacheControlEphemeral | null;
410
493
  }
411
494
 
495
+ export interface BetaCodeExecutionTool20250825 {
496
+ /**
497
+ * Name of the tool.
498
+ *
499
+ * This is how the tool will be called by the model and in `tool_use` blocks.
500
+ */
501
+ name: 'code_execution';
502
+
503
+ type: 'code_execution_20250825';
504
+
505
+ /**
506
+ * Create a cache control breakpoint at this content block.
507
+ */
508
+ cache_control?: BetaCacheControlEphemeral | null;
509
+ }
510
+
412
511
  export interface BetaCodeExecutionToolResultBlock {
413
512
  content: BetaCodeExecutionToolResultBlockContent;
414
513
 
@@ -506,7 +605,10 @@ export type BetaContentBlock =
506
605
  | BetaToolUseBlock
507
606
  | BetaServerToolUseBlock
508
607
  | BetaWebSearchToolResultBlock
608
+ | BetaWebFetchToolResultBlock
509
609
  | BetaCodeExecutionToolResultBlock
610
+ | BetaBashCodeExecutionToolResultBlock
611
+ | BetaTextEditorCodeExecutionToolResultBlock
510
612
  | BetaMCPToolUseBlock
511
613
  | BetaMCPToolResultBlock
512
614
  | BetaContainerUploadBlock;
@@ -525,7 +627,10 @@ export type BetaContentBlockParam =
525
627
  | BetaToolResultBlockParam
526
628
  | BetaServerToolUseBlockParam
527
629
  | BetaWebSearchToolResultBlockParam
630
+ | BetaWebFetchToolResultBlockParam
528
631
  | BetaCodeExecutionToolResultBlockParam
632
+ | BetaBashCodeExecutionToolResultBlockParam
633
+ | BetaTextEditorCodeExecutionToolResultBlockParam
529
634
  | BetaMCPToolUseBlockParam
530
635
  | BetaRequestMCPToolResultBlockParam
531
636
  | BetaContainerUploadBlockParam;
@@ -538,6 +643,22 @@ export interface BetaContentBlockSource {
538
643
 
539
644
  export type BetaContentBlockSourceContent = BetaTextBlockParam | BetaImageBlockParam;
540
645
 
646
+ export interface BetaDocumentBlock {
647
+ /**
648
+ * Citation configuration for the document
649
+ */
650
+ citations: BetaCitationConfig | null;
651
+
652
+ source: BetaBase64PDFSource | BetaPlainTextSource;
653
+
654
+ /**
655
+ * The title of the document
656
+ */
657
+ title: string | null;
658
+
659
+ type: 'document';
660
+ }
661
+
541
662
  export interface BetaFileDocumentSource {
542
663
  file_id: string;
543
664
 
@@ -819,7 +940,10 @@ export interface BetaRawContentBlockStartEvent {
819
940
  | BetaToolUseBlock
820
941
  | BetaServerToolUseBlock
821
942
  | BetaWebSearchToolResultBlock
943
+ | BetaWebFetchToolResultBlock
822
944
  | BetaCodeExecutionToolResultBlock
945
+ | BetaBashCodeExecutionToolResultBlock
946
+ | BetaTextEditorCodeExecutionToolResultBlock
823
947
  | BetaMCPToolUseBlock
824
948
  | BetaMCPToolResultBlock
825
949
  | BetaContainerUploadBlock;
@@ -919,7 +1043,7 @@ export interface BetaRequestDocumentBlock {
919
1043
  */
920
1044
  cache_control?: BetaCacheControlEphemeral | null;
921
1045
 
922
- citations?: BetaCitationsConfigParam;
1046
+ citations?: BetaCitationsConfigParam | null;
923
1047
 
924
1048
  context?: string | null;
925
1049
 
@@ -977,6 +1101,11 @@ export interface BetaSearchResultBlockParam {
977
1101
  }
978
1102
 
979
1103
  export interface BetaServerToolUsage {
1104
+ /**
1105
+ * The number of web fetch tool requests.
1106
+ */
1107
+ web_fetch_requests: number;
1108
+
980
1109
  /**
981
1110
  * The number of web search tool requests.
982
1111
  */
@@ -988,7 +1117,7 @@ export interface BetaServerToolUseBlock {
988
1117
 
989
1118
  input: unknown;
990
1119
 
991
- name: 'web_search' | 'code_execution';
1120
+ name: 'web_search' | 'web_fetch' | 'code_execution' | 'bash_code_execution' | 'text_editor_code_execution';
992
1121
 
993
1122
  type: 'server_tool_use';
994
1123
  }
@@ -998,7 +1127,7 @@ export interface BetaServerToolUseBlockParam {
998
1127
 
999
1128
  input: unknown;
1000
1129
 
1001
- name: 'web_search' | 'code_execution';
1130
+ name: 'web_search' | 'web_fetch' | 'code_execution' | 'bash_code_execution' | 'text_editor_code_execution';
1002
1131
 
1003
1132
  type: 'server_tool_use';
1004
1133
 
@@ -1070,6 +1199,129 @@ export interface BetaTextDelta {
1070
1199
  type: 'text_delta';
1071
1200
  }
1072
1201
 
1202
+ export interface BetaTextEditorCodeExecutionCreateResultBlock {
1203
+ is_file_update: boolean;
1204
+
1205
+ type: 'text_editor_code_execution_create_result';
1206
+ }
1207
+
1208
+ export interface BetaTextEditorCodeExecutionCreateResultBlockParam {
1209
+ is_file_update: boolean;
1210
+
1211
+ type: 'text_editor_code_execution_create_result';
1212
+ }
1213
+
1214
+ export interface BetaTextEditorCodeExecutionStrReplaceResultBlock {
1215
+ lines: Array<string> | null;
1216
+
1217
+ new_lines: number | null;
1218
+
1219
+ new_start: number | null;
1220
+
1221
+ old_lines: number | null;
1222
+
1223
+ old_start: number | null;
1224
+
1225
+ type: 'text_editor_code_execution_str_replace_result';
1226
+ }
1227
+
1228
+ export interface BetaTextEditorCodeExecutionStrReplaceResultBlockParam {
1229
+ type: 'text_editor_code_execution_str_replace_result';
1230
+
1231
+ lines?: Array<string> | null;
1232
+
1233
+ new_lines?: number | null;
1234
+
1235
+ new_start?: number | null;
1236
+
1237
+ old_lines?: number | null;
1238
+
1239
+ old_start?: number | null;
1240
+ }
1241
+
1242
+ export interface BetaTextEditorCodeExecutionToolResultBlock {
1243
+ content:
1244
+ | BetaTextEditorCodeExecutionToolResultError
1245
+ | BetaTextEditorCodeExecutionViewResultBlock
1246
+ | BetaTextEditorCodeExecutionCreateResultBlock
1247
+ | BetaTextEditorCodeExecutionStrReplaceResultBlock;
1248
+
1249
+ tool_use_id: string;
1250
+
1251
+ type: 'text_editor_code_execution_tool_result';
1252
+ }
1253
+
1254
+ export interface BetaTextEditorCodeExecutionToolResultBlockParam {
1255
+ content:
1256
+ | BetaTextEditorCodeExecutionToolResultErrorParam
1257
+ | BetaTextEditorCodeExecutionViewResultBlockParam
1258
+ | BetaTextEditorCodeExecutionCreateResultBlockParam
1259
+ | BetaTextEditorCodeExecutionStrReplaceResultBlockParam;
1260
+
1261
+ tool_use_id: string;
1262
+
1263
+ type: 'text_editor_code_execution_tool_result';
1264
+
1265
+ /**
1266
+ * Create a cache control breakpoint at this content block.
1267
+ */
1268
+ cache_control?: BetaCacheControlEphemeral | null;
1269
+ }
1270
+
1271
+ export interface BetaTextEditorCodeExecutionToolResultError {
1272
+ error_code:
1273
+ | 'invalid_tool_input'
1274
+ | 'unavailable'
1275
+ | 'too_many_requests'
1276
+ | 'execution_time_exceeded'
1277
+ | 'file_not_found';
1278
+
1279
+ error_message: string | null;
1280
+
1281
+ type: 'text_editor_code_execution_tool_result_error';
1282
+ }
1283
+
1284
+ export interface BetaTextEditorCodeExecutionToolResultErrorParam {
1285
+ error_code:
1286
+ | 'invalid_tool_input'
1287
+ | 'unavailable'
1288
+ | 'too_many_requests'
1289
+ | 'execution_time_exceeded'
1290
+ | 'file_not_found';
1291
+
1292
+ type: 'text_editor_code_execution_tool_result_error';
1293
+
1294
+ error_message?: string | null;
1295
+ }
1296
+
1297
+ export interface BetaTextEditorCodeExecutionViewResultBlock {
1298
+ content: string;
1299
+
1300
+ file_type: 'text' | 'image' | 'pdf';
1301
+
1302
+ num_lines: number | null;
1303
+
1304
+ start_line: number | null;
1305
+
1306
+ total_lines: number | null;
1307
+
1308
+ type: 'text_editor_code_execution_view_result';
1309
+ }
1310
+
1311
+ export interface BetaTextEditorCodeExecutionViewResultBlockParam {
1312
+ content: string;
1313
+
1314
+ file_type: 'text' | 'image' | 'pdf';
1315
+
1316
+ type: 'text_editor_code_execution_view_result';
1317
+
1318
+ num_lines?: number | null;
1319
+
1320
+ start_line?: number | null;
1321
+
1322
+ total_lines?: number | null;
1323
+ }
1324
+
1073
1325
  export interface BetaThinkingBlock {
1074
1326
  signature: string;
1075
1327
 
@@ -1345,7 +1597,9 @@ export interface BetaToolResultBlockParam {
1345
1597
  */
1346
1598
  cache_control?: BetaCacheControlEphemeral | null;
1347
1599
 
1348
- content?: string | Array<BetaTextBlockParam | BetaImageBlockParam | BetaSearchResultBlockParam>;
1600
+ content?:
1601
+ | string
1602
+ | Array<BetaTextBlockParam | BetaImageBlockParam | BetaSearchResultBlockParam | BetaRequestDocumentBlock>;
1349
1603
 
1350
1604
  is_error?: boolean;
1351
1605
  }
@@ -1425,13 +1679,15 @@ export type BetaToolUnion =
1425
1679
  | BetaToolBash20241022
1426
1680
  | BetaToolBash20250124
1427
1681
  | BetaCodeExecutionTool20250522
1682
+ | BetaCodeExecutionTool20250825
1428
1683
  | BetaToolComputerUse20241022
1429
1684
  | BetaToolComputerUse20250124
1430
1685
  | BetaToolTextEditor20241022
1431
1686
  | BetaToolTextEditor20250124
1432
1687
  | BetaToolTextEditor20250429
1433
1688
  | BetaToolTextEditor20250728
1434
- | BetaWebSearchTool20250305;
1689
+ | BetaWebSearchTool20250305
1690
+ | BetaWebFetchTool20250910;
1435
1691
 
1436
1692
  export interface BetaToolUseBlock {
1437
1693
  id: string;
@@ -1507,6 +1763,124 @@ export interface BetaUsage {
1507
1763
  service_tier: 'standard' | 'priority' | 'batch' | null;
1508
1764
  }
1509
1765
 
1766
+ export interface BetaWebFetchBlock {
1767
+ content: BetaDocumentBlock;
1768
+
1769
+ /**
1770
+ * ISO 8601 timestamp when the content was retrieved
1771
+ */
1772
+ retrieved_at: string | null;
1773
+
1774
+ type: 'web_fetch_result';
1775
+
1776
+ /**
1777
+ * Fetched content URL
1778
+ */
1779
+ url: string;
1780
+ }
1781
+
1782
+ export interface BetaWebFetchBlockParam {
1783
+ content: BetaRequestDocumentBlock;
1784
+
1785
+ type: 'web_fetch_result';
1786
+
1787
+ /**
1788
+ * Fetched content URL
1789
+ */
1790
+ url: string;
1791
+
1792
+ /**
1793
+ * ISO 8601 timestamp when the content was retrieved
1794
+ */
1795
+ retrieved_at?: string | null;
1796
+ }
1797
+
1798
+ export interface BetaWebFetchTool20250910 {
1799
+ /**
1800
+ * Name of the tool.
1801
+ *
1802
+ * This is how the tool will be called by the model and in `tool_use` blocks.
1803
+ */
1804
+ name: 'web_fetch';
1805
+
1806
+ type: 'web_fetch_20250910';
1807
+
1808
+ /**
1809
+ * List of domains to allow fetching from
1810
+ */
1811
+ allowed_domains?: Array<string> | null;
1812
+
1813
+ /**
1814
+ * List of domains to block fetching from
1815
+ */
1816
+ blocked_domains?: Array<string> | null;
1817
+
1818
+ /**
1819
+ * Create a cache control breakpoint at this content block.
1820
+ */
1821
+ cache_control?: BetaCacheControlEphemeral | null;
1822
+
1823
+ /**
1824
+ * Citations configuration for fetched documents. Citations are disabled by
1825
+ * default.
1826
+ */
1827
+ citations?: BetaCitationsConfigParam | null;
1828
+
1829
+ /**
1830
+ * Maximum number of tokens used by including web page text content in the context.
1831
+ * The limit is approximate and does not apply to binary content such as PDFs.
1832
+ */
1833
+ max_content_tokens?: number | null;
1834
+
1835
+ /**
1836
+ * Maximum number of times the tool can be used in the API request.
1837
+ */
1838
+ max_uses?: number | null;
1839
+ }
1840
+
1841
+ export interface BetaWebFetchToolResultBlock {
1842
+ content: BetaWebFetchToolResultErrorBlock | BetaWebFetchBlock;
1843
+
1844
+ tool_use_id: string;
1845
+
1846
+ type: 'web_fetch_tool_result';
1847
+ }
1848
+
1849
+ export interface BetaWebFetchToolResultBlockParam {
1850
+ content: BetaWebFetchToolResultErrorBlockParam | BetaWebFetchBlockParam;
1851
+
1852
+ tool_use_id: string;
1853
+
1854
+ type: 'web_fetch_tool_result';
1855
+
1856
+ /**
1857
+ * Create a cache control breakpoint at this content block.
1858
+ */
1859
+ cache_control?: BetaCacheControlEphemeral | null;
1860
+ }
1861
+
1862
+ export interface BetaWebFetchToolResultErrorBlock {
1863
+ error_code: BetaWebFetchToolResultErrorCode;
1864
+
1865
+ type: 'web_fetch_tool_result_error';
1866
+ }
1867
+
1868
+ export interface BetaWebFetchToolResultErrorBlockParam {
1869
+ error_code: BetaWebFetchToolResultErrorCode;
1870
+
1871
+ type: 'web_fetch_tool_result_error';
1872
+ }
1873
+
1874
+ export type BetaWebFetchToolResultErrorCode =
1875
+ | 'invalid_tool_input'
1876
+ | 'url_too_long'
1877
+ | 'url_not_allowed'
1878
+ | 'url_not_accessible'
1879
+ | 'unsupported_content_type'
1880
+ | 'too_many_requests'
1881
+ | 'max_uses_exceeded'
1882
+ | 'unavailable';
1883
+
1510
1884
  export interface BetaWebSearchResultBlock {
1511
1885
  encrypted_content: string;
1512
1886
 
@@ -1727,30 +2101,7 @@ export interface MessageCreateParamsBase {
1727
2101
  * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
1728
2102
  * ```
1729
2103
  *
1730
- * Starting with Claude 3 models, you can also send image content blocks:
1731
- *
1732
- * ```json
1733
- * {
1734
- * "role": "user",
1735
- * "content": [
1736
- * {
1737
- * "type": "image",
1738
- * "source": {
1739
- * "type": "base64",
1740
- * "media_type": "image/jpeg",
1741
- * "data": "/9j/4AAQSkZJRg..."
1742
- * }
1743
- * },
1744
- * { "type": "text", "text": "What is in this image?" }
1745
- * ]
1746
- * }
1747
- * ```
1748
- *
1749
- * We currently support the `base64` source type for images, and the `image/jpeg`,
1750
- * `image/png`, `image/gif`, and `image/webp` media types.
1751
- *
1752
- * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
1753
- * more input examples.
2104
+ * See [input examples](https://docs.anthropic.com/en/api/messages-examples).
1754
2105
  *
1755
2106
  * Note that if you want to include a
1756
2107
  * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
@@ -2049,30 +2400,7 @@ export interface MessageCountTokensParams {
2049
2400
  * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
2050
2401
  * ```
2051
2402
  *
2052
- * Starting with Claude 3 models, you can also send image content blocks:
2053
- *
2054
- * ```json
2055
- * {
2056
- * "role": "user",
2057
- * "content": [
2058
- * {
2059
- * "type": "image",
2060
- * "source": {
2061
- * "type": "base64",
2062
- * "media_type": "image/jpeg",
2063
- * "data": "/9j/4AAQSkZJRg..."
2064
- * }
2065
- * },
2066
- * { "type": "text", "text": "What is in this image?" }
2067
- * ]
2068
- * }
2069
- * ```
2070
- *
2071
- * We currently support the `base64` source type for images, and the `image/jpeg`,
2072
- * `image/png`, `image/gif`, and `image/webp` media types.
2073
- *
2074
- * See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
2075
- * more input examples.
2403
+ * See [input examples](https://docs.anthropic.com/en/api/messages-examples).
2076
2404
  *
2077
2405
  * Note that if you want to include a
2078
2406
  * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
@@ -2205,6 +2533,7 @@ export interface MessageCountTokensParams {
2205
2533
  | BetaToolBash20241022
2206
2534
  | BetaToolBash20250124
2207
2535
  | BetaCodeExecutionTool20250522
2536
+ | BetaCodeExecutionTool20250825
2208
2537
  | BetaToolComputerUse20241022
2209
2538
  | BetaToolComputerUse20250124
2210
2539
  | BetaToolTextEditor20241022
@@ -2212,6 +2541,7 @@ export interface MessageCountTokensParams {
2212
2541
  | BetaToolTextEditor20250429
2213
2542
  | BetaToolTextEditor20250728
2214
2543
  | BetaWebSearchTool20250305
2544
+ | BetaWebFetchTool20250910
2215
2545
  >;
2216
2546
 
2217
2547
  /**
@@ -2226,10 +2556,19 @@ export declare namespace Messages {
2226
2556
  export {
2227
2557
  type BetaBase64ImageSource as BetaBase64ImageSource,
2228
2558
  type BetaBase64PDFSource as BetaBase64PDFSource,
2559
+ type BetaBashCodeExecutionOutputBlock as BetaBashCodeExecutionOutputBlock,
2560
+ type BetaBashCodeExecutionOutputBlockParam as BetaBashCodeExecutionOutputBlockParam,
2561
+ type BetaBashCodeExecutionResultBlock as BetaBashCodeExecutionResultBlock,
2562
+ type BetaBashCodeExecutionResultBlockParam as BetaBashCodeExecutionResultBlockParam,
2563
+ type BetaBashCodeExecutionToolResultBlock as BetaBashCodeExecutionToolResultBlock,
2564
+ type BetaBashCodeExecutionToolResultBlockParam as BetaBashCodeExecutionToolResultBlockParam,
2565
+ type BetaBashCodeExecutionToolResultError as BetaBashCodeExecutionToolResultError,
2566
+ type BetaBashCodeExecutionToolResultErrorParam as BetaBashCodeExecutionToolResultErrorParam,
2229
2567
  type BetaCacheControlEphemeral as BetaCacheControlEphemeral,
2230
2568
  type BetaCacheCreation as BetaCacheCreation,
2231
2569
  type BetaCitationCharLocation as BetaCitationCharLocation,
2232
2570
  type BetaCitationCharLocationParam as BetaCitationCharLocationParam,
2571
+ type BetaCitationConfig as BetaCitationConfig,
2233
2572
  type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation,
2234
2573
  type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam,
2235
2574
  type BetaCitationPageLocation as BetaCitationPageLocation,
@@ -2245,6 +2584,7 @@ export declare namespace Messages {
2245
2584
  type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock,
2246
2585
  type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam,
2247
2586
  type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522,
2587
+ type BetaCodeExecutionTool20250825 as BetaCodeExecutionTool20250825,
2248
2588
  type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock,
2249
2589
  type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent,
2250
2590
  type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam,
@@ -2259,6 +2599,7 @@ export declare namespace Messages {
2259
2599
  type BetaContentBlockParam as BetaContentBlockParam,
2260
2600
  type BetaContentBlockSource as BetaContentBlockSource,
2261
2601
  type BetaContentBlockSourceContent as BetaContentBlockSourceContent,
2602
+ type BetaDocumentBlock as BetaDocumentBlock,
2262
2603
  type BetaFileDocumentSource as BetaFileDocumentSource,
2263
2604
  type BetaFileImageSource as BetaFileImageSource,
2264
2605
  type BetaImageBlockParam as BetaImageBlockParam,
@@ -2297,6 +2638,16 @@ export declare namespace Messages {
2297
2638
  type BetaTextCitation as BetaTextCitation,
2298
2639
  type BetaTextCitationParam as BetaTextCitationParam,
2299
2640
  type BetaTextDelta as BetaTextDelta,
2641
+ type BetaTextEditorCodeExecutionCreateResultBlock as BetaTextEditorCodeExecutionCreateResultBlock,
2642
+ type BetaTextEditorCodeExecutionCreateResultBlockParam as BetaTextEditorCodeExecutionCreateResultBlockParam,
2643
+ type BetaTextEditorCodeExecutionStrReplaceResultBlock as BetaTextEditorCodeExecutionStrReplaceResultBlock,
2644
+ type BetaTextEditorCodeExecutionStrReplaceResultBlockParam as BetaTextEditorCodeExecutionStrReplaceResultBlockParam,
2645
+ type BetaTextEditorCodeExecutionToolResultBlock as BetaTextEditorCodeExecutionToolResultBlock,
2646
+ type BetaTextEditorCodeExecutionToolResultBlockParam as BetaTextEditorCodeExecutionToolResultBlockParam,
2647
+ type BetaTextEditorCodeExecutionToolResultError as BetaTextEditorCodeExecutionToolResultError,
2648
+ type BetaTextEditorCodeExecutionToolResultErrorParam as BetaTextEditorCodeExecutionToolResultErrorParam,
2649
+ type BetaTextEditorCodeExecutionViewResultBlock as BetaTextEditorCodeExecutionViewResultBlock,
2650
+ type BetaTextEditorCodeExecutionViewResultBlockParam as BetaTextEditorCodeExecutionViewResultBlockParam,
2300
2651
  type BetaThinkingBlock as BetaThinkingBlock,
2301
2652
  type BetaThinkingBlockParam as BetaThinkingBlockParam,
2302
2653
  type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled,
@@ -2324,6 +2675,14 @@ export declare namespace Messages {
2324
2675
  type BetaURLImageSource as BetaURLImageSource,
2325
2676
  type BetaURLPDFSource as BetaURLPDFSource,
2326
2677
  type BetaUsage as BetaUsage,
2678
+ type BetaWebFetchBlock as BetaWebFetchBlock,
2679
+ type BetaWebFetchBlockParam as BetaWebFetchBlockParam,
2680
+ type BetaWebFetchTool20250910 as BetaWebFetchTool20250910,
2681
+ type BetaWebFetchToolResultBlock as BetaWebFetchToolResultBlock,
2682
+ type BetaWebFetchToolResultBlockParam as BetaWebFetchToolResultBlockParam,
2683
+ type BetaWebFetchToolResultErrorBlock as BetaWebFetchToolResultErrorBlock,
2684
+ type BetaWebFetchToolResultErrorBlockParam as BetaWebFetchToolResultErrorBlockParam,
2685
+ type BetaWebFetchToolResultErrorCode as BetaWebFetchToolResultErrorCode,
2327
2686
  type BetaWebSearchResultBlock as BetaWebSearchResultBlock,
2328
2687
  type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam,
2329
2688
  type BetaWebSearchTool20250305 as BetaWebSearchTool20250305,