@anthropic-ai/sdk 0.65.0 → 0.67.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 (124) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/bin/cli +12 -5
  3. package/bin/migration-config.json +76 -1
  4. package/client.d.mts +5 -1
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +5 -1
  7. package/client.d.ts.map +1 -1
  8. package/client.js.map +1 -1
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +42 -0
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +42 -0
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +63 -1
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +60 -0
  17. package/core/pagination.mjs.map +1 -1
  18. package/internal/to-file.d.mts +1 -1
  19. package/internal/to-file.d.ts +1 -1
  20. package/internal/to-file.js +1 -1
  21. package/internal/to-file.mjs +1 -1
  22. package/lib/tools/BetaToolRunner.d.mts.map +1 -1
  23. package/lib/tools/BetaToolRunner.d.ts.map +1 -1
  24. package/lib/tools/BetaToolRunner.js +3 -0
  25. package/lib/tools/BetaToolRunner.js.map +1 -1
  26. package/lib/tools/BetaToolRunner.mjs +3 -0
  27. package/lib/tools/BetaToolRunner.mjs.map +1 -1
  28. package/lib/tools/ToolRunner.d.mts.map +1 -1
  29. package/lib/tools/ToolRunner.d.ts.map +1 -1
  30. package/lib/tools/ToolRunner.js +3 -0
  31. package/lib/tools/ToolRunner.js.map +1 -1
  32. package/lib/tools/ToolRunner.mjs +3 -0
  33. package/lib/tools/ToolRunner.mjs.map +1 -1
  34. package/package.json +1 -1
  35. package/resources/beta/beta.d.mts +7 -3
  36. package/resources/beta/beta.d.mts.map +1 -1
  37. package/resources/beta/beta.d.ts +7 -3
  38. package/resources/beta/beta.d.ts.map +1 -1
  39. package/resources/beta/beta.js +4 -0
  40. package/resources/beta/beta.js.map +1 -1
  41. package/resources/beta/beta.mjs +4 -0
  42. package/resources/beta/beta.mjs.map +1 -1
  43. package/resources/beta/index.d.mts +2 -1
  44. package/resources/beta/index.d.mts.map +1 -1
  45. package/resources/beta/index.d.ts +2 -1
  46. package/resources/beta/index.d.ts.map +1 -1
  47. package/resources/beta/index.js +3 -1
  48. package/resources/beta/index.js.map +1 -1
  49. package/resources/beta/index.mjs +1 -0
  50. package/resources/beta/index.mjs.map +1 -1
  51. package/resources/beta/messages/index.d.mts +1 -1
  52. package/resources/beta/messages/index.d.mts.map +1 -1
  53. package/resources/beta/messages/index.d.ts +1 -1
  54. package/resources/beta/messages/index.d.ts.map +1 -1
  55. package/resources/beta/messages/index.js.map +1 -1
  56. package/resources/beta/messages/index.mjs.map +1 -1
  57. package/resources/beta/messages/messages.d.mts +90 -43
  58. package/resources/beta/messages/messages.d.mts.map +1 -1
  59. package/resources/beta/messages/messages.d.ts +90 -43
  60. package/resources/beta/messages/messages.d.ts.map +1 -1
  61. package/resources/beta/messages/messages.js.map +1 -1
  62. package/resources/beta/messages/messages.mjs.map +1 -1
  63. package/resources/beta/skills/index.d.mts +3 -0
  64. package/resources/beta/skills/index.d.mts.map +1 -0
  65. package/resources/beta/skills/index.d.ts +3 -0
  66. package/resources/beta/skills/index.d.ts.map +1 -0
  67. package/resources/beta/skills/index.js +9 -0
  68. package/resources/beta/skills/index.js.map +1 -0
  69. package/resources/beta/skills/index.mjs +4 -0
  70. package/resources/beta/skills/index.mjs.map +1 -0
  71. package/resources/beta/skills/skills.d.mts +249 -0
  72. package/resources/beta/skills/skills.d.mts.map +1 -0
  73. package/resources/beta/skills/skills.d.ts +249 -0
  74. package/resources/beta/skills/skills.d.ts.map +1 -0
  75. package/resources/beta/skills/skills.js +98 -0
  76. package/resources/beta/skills/skills.js.map +1 -0
  77. package/resources/beta/skills/skills.mjs +93 -0
  78. package/resources/beta/skills/skills.mjs.map +1 -0
  79. package/resources/beta/skills/versions.d.mts +257 -0
  80. package/resources/beta/skills/versions.d.mts.map +1 -0
  81. package/resources/beta/skills/versions.d.ts +257 -0
  82. package/resources/beta/skills/versions.d.ts.map +1 -0
  83. package/resources/beta/skills/versions.js +100 -0
  84. package/resources/beta/skills/versions.js.map +1 -0
  85. package/resources/beta/skills/versions.mjs +96 -0
  86. package/resources/beta/skills/versions.mjs.map +1 -0
  87. package/resources/beta/skills.d.mts +2 -0
  88. package/resources/beta/skills.d.mts.map +1 -0
  89. package/resources/beta/skills.d.ts +2 -0
  90. package/resources/beta/skills.d.ts.map +1 -0
  91. package/resources/beta/skills.js +6 -0
  92. package/resources/beta/skills.js.map +1 -0
  93. package/resources/beta/skills.mjs +3 -0
  94. package/resources/beta/skills.mjs.map +1 -0
  95. package/resources/completions.d.mts +8 -9
  96. package/resources/completions.d.mts.map +1 -1
  97. package/resources/completions.d.ts +8 -9
  98. package/resources/completions.d.ts.map +1 -1
  99. package/resources/messages/messages.d.mts +27 -30
  100. package/resources/messages/messages.d.mts.map +1 -1
  101. package/resources/messages/messages.d.ts +27 -30
  102. package/resources/messages/messages.d.ts.map +1 -1
  103. package/resources/messages/messages.js.map +1 -1
  104. package/resources/messages/messages.mjs.map +1 -1
  105. package/src/client.ts +14 -1
  106. package/src/core/pagination.ts +130 -0
  107. package/src/internal/to-file.ts +1 -1
  108. package/src/lib/tools/BetaToolRunner.ts +3 -0
  109. package/src/lib/tools/ToolRunner.ts +3 -0
  110. package/src/resources/beta/beta.ts +38 -1
  111. package/src/resources/beta/index.ts +15 -0
  112. package/src/resources/beta/messages/index.ts +3 -0
  113. package/src/resources/beta/messages/messages.ts +101 -42
  114. package/src/resources/beta/skills/index.ts +26 -0
  115. package/src/resources/beta/skills/skills.ts +383 -0
  116. package/src/resources/beta/skills/versions.ts +374 -0
  117. package/src/resources/beta/skills.ts +3 -0
  118. package/src/resources/completions.ts +8 -9
  119. package/src/resources/messages/messages.ts +28 -36
  120. package/src/version.ts +1 -1
  121. package/version.d.mts +1 -1
  122. package/version.d.ts +1 -1
  123. package/version.js +1 -1
  124. package/version.mjs +1 -1
@@ -59,6 +59,7 @@ import {
59
59
  BetaCodeExecutionToolResultErrorCode,
60
60
  BetaCodeExecutionToolResultErrorParam,
61
61
  BetaContainer,
62
+ BetaContainerParams,
62
63
  BetaContainerUploadBlock,
63
64
  BetaContainerUploadBlockParam,
64
65
  BetaContentBlock,
@@ -111,6 +112,8 @@ import {
111
112
  BetaServerToolUseBlock,
112
113
  BetaServerToolUseBlockParam,
113
114
  BetaSignatureDelta,
115
+ BetaSkill,
116
+ BetaSkillParams,
114
117
  BetaStopReason,
115
118
  BetaTextBlock,
116
119
  BetaTextBlockParam,
@@ -181,11 +184,25 @@ import {
181
184
  MessageCreateParamsStreaming,
182
185
  Messages,
183
186
  } from './messages/messages';
187
+ import * as SkillsAPI from './skills/skills';
188
+ import {
189
+ SkillCreateParams,
190
+ SkillCreateResponse,
191
+ SkillDeleteParams,
192
+ SkillDeleteResponse,
193
+ SkillListParams,
194
+ SkillListResponse,
195
+ SkillListResponsesPageCursor,
196
+ SkillRetrieveParams,
197
+ SkillRetrieveResponse,
198
+ Skills,
199
+ } from './skills/skills';
184
200
 
185
201
  export class Beta extends APIResource {
186
202
  models: ModelsAPI.Models = new ModelsAPI.Models(this._client);
187
203
  messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
188
204
  files: FilesAPI.Files = new FilesAPI.Files(this._client);
205
+ skills: SkillsAPI.Skills = new SkillsAPI.Skills(this._client);
189
206
  }
190
207
 
191
208
  export type AnthropicBeta =
@@ -204,7 +221,10 @@ export type AnthropicBeta =
204
221
  | 'interleaved-thinking-2025-05-14'
205
222
  | 'code-execution-2025-05-22'
206
223
  | 'extended-cache-ttl-2025-04-11'
207
- | 'context-1m-2025-08-07';
224
+ | 'context-1m-2025-08-07'
225
+ | 'context-management-2025-06-27'
226
+ | 'model-context-window-exceeded-2025-08-26'
227
+ | 'skills-2025-10-02';
208
228
 
209
229
  export interface BetaAPIError {
210
230
  message: string;
@@ -282,6 +302,7 @@ export interface BetaRateLimitError {
282
302
  Beta.Models = Models;
283
303
  Beta.Messages = Messages;
284
304
  Beta.Files = Files;
305
+ Beta.Skills = Skills;
285
306
 
286
307
  export declare namespace Beta {
287
308
  export {
@@ -350,6 +371,7 @@ export declare namespace Beta {
350
371
  type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode,
351
372
  type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam,
352
373
  type BetaContainer as BetaContainer,
374
+ type BetaContainerParams as BetaContainerParams,
353
375
  type BetaContainerUploadBlock as BetaContainerUploadBlock,
354
376
  type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam,
355
377
  type BetaContentBlock as BetaContentBlock,
@@ -402,6 +424,8 @@ export declare namespace Beta {
402
424
  type BetaServerToolUseBlock as BetaServerToolUseBlock,
403
425
  type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam,
404
426
  type BetaSignatureDelta as BetaSignatureDelta,
427
+ type BetaSkill as BetaSkill,
428
+ type BetaSkillParams as BetaSkillParams,
405
429
  type BetaStopReason as BetaStopReason,
406
430
  type BetaTextBlock as BetaTextBlock,
407
431
  type BetaTextBlockParam as BetaTextBlockParam,
@@ -484,4 +508,17 @@ export declare namespace Beta {
484
508
  type FileRetrieveMetadataParams as FileRetrieveMetadataParams,
485
509
  type FileUploadParams as FileUploadParams,
486
510
  };
511
+
512
+ export {
513
+ Skills as Skills,
514
+ type SkillCreateResponse as SkillCreateResponse,
515
+ type SkillRetrieveResponse as SkillRetrieveResponse,
516
+ type SkillListResponse as SkillListResponse,
517
+ type SkillDeleteResponse as SkillDeleteResponse,
518
+ type SkillListResponsesPageCursor as SkillListResponsesPageCursor,
519
+ type SkillCreateParams as SkillCreateParams,
520
+ type SkillRetrieveParams as SkillRetrieveParams,
521
+ type SkillListParams as SkillListParams,
522
+ type SkillDeleteParams as SkillDeleteParams,
523
+ };
487
524
  }
@@ -69,6 +69,7 @@ export {
69
69
  type BetaCodeExecutionToolResultErrorCode,
70
70
  type BetaCodeExecutionToolResultErrorParam,
71
71
  type BetaContainer,
72
+ type BetaContainerParams,
72
73
  type BetaContainerUploadBlock,
73
74
  type BetaContainerUploadBlockParam,
74
75
  type BetaContentBlock,
@@ -121,6 +122,8 @@ export {
121
122
  type BetaServerToolUseBlock,
122
123
  type BetaServerToolUseBlockParam,
123
124
  type BetaSignatureDelta,
125
+ type BetaSkill,
126
+ type BetaSkillParams,
124
127
  type BetaStopReason,
125
128
  type BetaTextBlock,
126
129
  type BetaTextBlockParam,
@@ -198,3 +201,15 @@ export {
198
201
  type ModelListParams,
199
202
  type BetaModelInfosPage,
200
203
  } from './models';
204
+ export {
205
+ Skills,
206
+ type SkillCreateResponse,
207
+ type SkillRetrieveResponse,
208
+ type SkillListResponse,
209
+ type SkillDeleteResponse,
210
+ type SkillCreateParams,
211
+ type SkillRetrieveParams,
212
+ type SkillListParams,
213
+ type SkillDeleteParams,
214
+ type SkillListResponsesPageCursor,
215
+ } from './skills/index';
@@ -62,6 +62,7 @@ export {
62
62
  type BetaCodeExecutionToolResultErrorCode,
63
63
  type BetaCodeExecutionToolResultErrorParam,
64
64
  type BetaContainer,
65
+ type BetaContainerParams,
65
66
  type BetaContainerUploadBlock,
66
67
  type BetaContainerUploadBlockParam,
67
68
  type BetaContentBlock,
@@ -114,6 +115,8 @@ export {
114
115
  type BetaServerToolUseBlock,
115
116
  type BetaServerToolUseBlockParam,
116
117
  type BetaSignatureDelta,
118
+ type BetaSkill,
119
+ type BetaSkillParams,
117
120
  type BetaStopReason,
118
121
  type BetaTextBlock,
119
122
  type BetaTextBlockParam,
@@ -489,9 +489,6 @@ export interface BetaClearToolUses20250919Edit {
489
489
  trigger?: BetaInputTokensTrigger | BetaToolUsesTrigger;
490
490
  }
491
491
 
492
- /**
493
- * Results for clear_tool_uses_20250919 edit.
494
- */
495
492
  export interface BetaClearToolUses20250919EditResponse {
496
493
  /**
497
494
  * Number of input tokens cleared by this edit.
@@ -638,6 +635,26 @@ export interface BetaContainer {
638
635
  * The time at which the container will expire.
639
636
  */
640
637
  expires_at: string;
638
+
639
+ /**
640
+ * Skills loaded in the container
641
+ */
642
+ skills: Array<BetaSkill> | null;
643
+ }
644
+
645
+ /**
646
+ * Container parameters with skills to be loaded.
647
+ */
648
+ export interface BetaContainerParams {
649
+ /**
650
+ * Container id
651
+ */
652
+ id?: string | null;
653
+
654
+ /**
655
+ * List of skills to load in the container
656
+ */
657
+ skills?: Array<BetaSkillParams> | null;
641
658
  }
642
659
 
643
660
  /**
@@ -712,9 +729,6 @@ export interface BetaContentBlockSource {
712
729
 
713
730
  export type BetaContentBlockSourceContent = BetaTextBlockParam | BetaImageBlockParam;
714
731
 
715
- /**
716
- * Configuration for context management operations.
717
- */
718
732
  export interface BetaContextManagementConfig {
719
733
  /**
720
734
  * List of context management edits to apply
@@ -722,9 +736,6 @@ export interface BetaContextManagementConfig {
722
736
  edits?: Array<BetaClearToolUses20250919Edit>;
723
737
  }
724
738
 
725
- /**
726
- * Information about context management operations applied during the request.
727
- */
728
739
  export interface BetaContextManagementResponse {
729
740
  /**
730
741
  * List of context management edits that were applied.
@@ -1026,7 +1037,9 @@ export interface BetaMessage {
1026
1037
  content: Array<BetaContentBlock>;
1027
1038
 
1028
1039
  /**
1029
- * Information about context management operations applied during the request.
1040
+ * Context management response.
1041
+ *
1042
+ * Information about context management strategies applied during the request.
1030
1043
  */
1031
1044
  context_management: BetaContextManagementResponse | null;
1032
1045
 
@@ -1210,7 +1223,7 @@ export interface BetaRawContentBlockStopEvent {
1210
1223
 
1211
1224
  export interface BetaRawMessageDeltaEvent {
1212
1225
  /**
1213
- * Information about context management operations applied during the request.
1226
+ * Information about context management strategies applied during the request
1214
1227
  */
1215
1228
  context_management: BetaContextManagementResponse | null;
1216
1229
 
@@ -1397,6 +1410,46 @@ export interface BetaSignatureDelta {
1397
1410
  type: 'signature_delta';
1398
1411
  }
1399
1412
 
1413
+ /**
1414
+ * A skill that was loaded in a container (response model).
1415
+ */
1416
+ export interface BetaSkill {
1417
+ /**
1418
+ * Skill ID
1419
+ */
1420
+ skill_id: string;
1421
+
1422
+ /**
1423
+ * Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
1424
+ */
1425
+ type: 'anthropic' | 'custom';
1426
+
1427
+ /**
1428
+ * Skill version or 'latest' for most recent version
1429
+ */
1430
+ version: string;
1431
+ }
1432
+
1433
+ /**
1434
+ * Specification for a skill to be loaded in a container (request model).
1435
+ */
1436
+ export interface BetaSkillParams {
1437
+ /**
1438
+ * Skill ID
1439
+ */
1440
+ skill_id: string;
1441
+
1442
+ /**
1443
+ * Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
1444
+ */
1445
+ type: 'anthropic' | 'custom';
1446
+
1447
+ /**
1448
+ * Skill version or 'latest' for most recent version
1449
+ */
1450
+ version?: string;
1451
+ }
1452
+
1400
1453
  export type BetaStopReason =
1401
1454
  | 'end_turn'
1402
1455
  | 'max_tokens'
@@ -1606,7 +1659,7 @@ export interface BetaThinkingConfigEnabled {
1606
1659
  * Must be ≥1024 and less than `max_tokens`.
1607
1660
  *
1608
1661
  * See
1609
- * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
1662
+ * [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
1610
1663
  * for details.
1611
1664
  */
1612
1665
  budget_tokens: number;
@@ -1622,7 +1675,7 @@ export interface BetaThinkingConfigEnabled {
1622
1675
  * tokens and counts towards your `max_tokens` limit.
1623
1676
  *
1624
1677
  * See
1625
- * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
1678
+ * [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
1626
1679
  * for details.
1627
1680
  */
1628
1681
  export type BetaThinkingConfigParam = BetaThinkingConfigEnabled | BetaThinkingConfigDisabled;
@@ -2309,7 +2362,7 @@ export interface MessageCreateParamsBase {
2309
2362
  * only specifies the absolute maximum number of tokens to generate.
2310
2363
  *
2311
2364
  * Different models have different maximum values for this parameter. See
2312
- * [models](https://docs.anthropic.com/en/docs/models-overview) for details.
2365
+ * [models](https://docs.claude.com/en/docs/models-overview) for details.
2313
2366
  */
2314
2367
  max_tokens: number;
2315
2368
 
@@ -2371,12 +2424,12 @@ export interface MessageCreateParamsBase {
2371
2424
  * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
2372
2425
  * ```
2373
2426
  *
2374
- * See [input examples](https://docs.anthropic.com/en/api/messages-examples).
2427
+ * See [input examples](https://docs.claude.com/en/api/messages-examples).
2375
2428
  *
2376
2429
  * Note that if you want to include a
2377
- * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
2378
- * the top-level `system` parameter — there is no `"system"` role for input
2379
- * messages in the Messages API.
2430
+ * [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
2431
+ * top-level `system` parameter — there is no `"system"` role for input messages in
2432
+ * the Messages API.
2380
2433
  *
2381
2434
  * There is a limit of 100,000 messages in a single request.
2382
2435
  */
@@ -2392,10 +2445,13 @@ export interface MessageCreateParamsBase {
2392
2445
  /**
2393
2446
  * Body param: Container identifier for reuse across requests.
2394
2447
  */
2395
- container?: string | null;
2448
+ container?: BetaContainerParams | string | null;
2396
2449
 
2397
2450
  /**
2398
- * Body param: Configuration for context management operations.
2451
+ * Body param: Context management configuration.
2452
+ *
2453
+ * This allows you to control how Claude manages context across multiple requests,
2454
+ * such as whether to clear function results or not.
2399
2455
  */
2400
2456
  context_management?: BetaContextManagementConfig | null;
2401
2457
 
@@ -2414,7 +2470,7 @@ export interface MessageCreateParamsBase {
2414
2470
  * standard capacity for this request.
2415
2471
  *
2416
2472
  * Anthropic offers different levels of service for your API requests. See
2417
- * [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
2473
+ * [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
2418
2474
  */
2419
2475
  service_tier?: 'auto' | 'standard_only';
2420
2476
 
@@ -2435,8 +2491,7 @@ export interface MessageCreateParamsBase {
2435
2491
  * Body param: Whether to incrementally stream the response using server-sent
2436
2492
  * events.
2437
2493
  *
2438
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
2439
- * details.
2494
+ * See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
2440
2495
  */
2441
2496
  stream?: boolean;
2442
2497
 
@@ -2445,7 +2500,7 @@ export interface MessageCreateParamsBase {
2445
2500
  *
2446
2501
  * A system prompt is a way of providing context and instructions to Claude, such
2447
2502
  * as specifying a particular goal or role. See our
2448
- * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
2503
+ * [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
2449
2504
  */
2450
2505
  system?: string | Array<BetaTextBlockParam>;
2451
2506
 
@@ -2469,7 +2524,7 @@ export interface MessageCreateParamsBase {
2469
2524
  * tokens and counts towards your `max_tokens` limit.
2470
2525
  *
2471
2526
  * See
2472
- * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
2527
+ * [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
2473
2528
  * for details.
2474
2529
  */
2475
2530
  thinking?: BetaThinkingConfigParam;
@@ -2490,9 +2545,9 @@ export interface MessageCreateParamsBase {
2490
2545
  *
2491
2546
  * There are two types of tools: **client tools** and **server tools**. The
2492
2547
  * behavior described below applies to client tools. For
2493
- * [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
2548
+ * [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
2494
2549
  * see their individual documentation as each has its own behavior (e.g., the
2495
- * [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
2550
+ * [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
2496
2551
  *
2497
2552
  * Each tool definition includes:
2498
2553
  *
@@ -2555,7 +2610,7 @@ export interface MessageCreateParamsBase {
2555
2610
  * functions, or more generally whenever you want the model to produce a particular
2556
2611
  * JSON structure of output.
2557
2612
  *
2558
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
2613
+ * See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
2559
2614
  */
2560
2615
  tools?: Array<BetaToolUnion>;
2561
2616
 
@@ -2599,8 +2654,7 @@ export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase
2599
2654
  * Body param: Whether to incrementally stream the response using server-sent
2600
2655
  * events.
2601
2656
  *
2602
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
2603
- * details.
2657
+ * See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
2604
2658
  */
2605
2659
  stream?: false;
2606
2660
  }
@@ -2610,8 +2664,7 @@ export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
2610
2664
  * Body param: Whether to incrementally stream the response using server-sent
2611
2665
  * events.
2612
2666
  *
2613
- * See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
2614
- * details.
2667
+ * See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
2615
2668
  */
2616
2669
  stream: true;
2617
2670
  }
@@ -2675,12 +2728,12 @@ export interface MessageCountTokensParams {
2675
2728
  * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
2676
2729
  * ```
2677
2730
  *
2678
- * See [input examples](https://docs.anthropic.com/en/api/messages-examples).
2731
+ * See [input examples](https://docs.claude.com/en/api/messages-examples).
2679
2732
  *
2680
2733
  * Note that if you want to include a
2681
- * [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
2682
- * the top-level `system` parameter — there is no `"system"` role for input
2683
- * messages in the Messages API.
2734
+ * [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
2735
+ * top-level `system` parameter — there is no `"system"` role for input messages in
2736
+ * the Messages API.
2684
2737
  *
2685
2738
  * There is a limit of 100,000 messages in a single request.
2686
2739
  */
@@ -2694,7 +2747,10 @@ export interface MessageCountTokensParams {
2694
2747
  model: MessagesAPI.Model;
2695
2748
 
2696
2749
  /**
2697
- * Body param: Configuration for context management operations.
2750
+ * Body param: Context management configuration.
2751
+ *
2752
+ * This allows you to control how Claude manages context across multiple requests,
2753
+ * such as whether to clear function results or not.
2698
2754
  */
2699
2755
  context_management?: BetaContextManagementConfig | null;
2700
2756
 
@@ -2708,7 +2764,7 @@ export interface MessageCountTokensParams {
2708
2764
  *
2709
2765
  * A system prompt is a way of providing context and instructions to Claude, such
2710
2766
  * as specifying a particular goal or role. See our
2711
- * [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
2767
+ * [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
2712
2768
  */
2713
2769
  system?: string | Array<BetaTextBlockParam>;
2714
2770
 
@@ -2720,7 +2776,7 @@ export interface MessageCountTokensParams {
2720
2776
  * tokens and counts towards your `max_tokens` limit.
2721
2777
  *
2722
2778
  * See
2723
- * [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
2779
+ * [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
2724
2780
  * for details.
2725
2781
  */
2726
2782
  thinking?: BetaThinkingConfigParam;
@@ -2741,9 +2797,9 @@ export interface MessageCountTokensParams {
2741
2797
  *
2742
2798
  * There are two types of tools: **client tools** and **server tools**. The
2743
2799
  * behavior described below applies to client tools. For
2744
- * [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
2800
+ * [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
2745
2801
  * see their individual documentation as each has its own behavior (e.g., the
2746
- * [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
2802
+ * [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
2747
2803
  *
2748
2804
  * Each tool definition includes:
2749
2805
  *
@@ -2806,7 +2862,7 @@ export interface MessageCountTokensParams {
2806
2862
  * functions, or more generally whenever you want the model to produce a particular
2807
2863
  * JSON structure of output.
2808
2864
  *
2809
- * See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
2865
+ * See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
2810
2866
  */
2811
2867
  tools?: Array<
2812
2868
  | BetaTool
@@ -2880,6 +2936,7 @@ export declare namespace Messages {
2880
2936
  type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode,
2881
2937
  type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam,
2882
2938
  type BetaContainer as BetaContainer,
2939
+ type BetaContainerParams as BetaContainerParams,
2883
2940
  type BetaContainerUploadBlock as BetaContainerUploadBlock,
2884
2941
  type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam,
2885
2942
  type BetaContentBlock as BetaContentBlock,
@@ -2932,6 +2989,8 @@ export declare namespace Messages {
2932
2989
  type BetaServerToolUseBlock as BetaServerToolUseBlock,
2933
2990
  type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam,
2934
2991
  type BetaSignatureDelta as BetaSignatureDelta,
2992
+ type BetaSkill as BetaSkill,
2993
+ type BetaSkillParams as BetaSkillParams,
2935
2994
  type BetaStopReason as BetaStopReason,
2936
2995
  type BetaTextBlock as BetaTextBlock,
2937
2996
  type BetaTextBlockParam as BetaTextBlockParam,
@@ -0,0 +1,26 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Skills,
5
+ type SkillCreateResponse,
6
+ type SkillRetrieveResponse,
7
+ type SkillListResponse,
8
+ type SkillDeleteResponse,
9
+ type SkillCreateParams,
10
+ type SkillRetrieveParams,
11
+ type SkillListParams,
12
+ type SkillDeleteParams,
13
+ type SkillListResponsesPageCursor,
14
+ } from './skills';
15
+ export {
16
+ Versions,
17
+ type VersionCreateResponse,
18
+ type VersionRetrieveResponse,
19
+ type VersionListResponse,
20
+ type VersionDeleteResponse,
21
+ type VersionCreateParams,
22
+ type VersionRetrieveParams,
23
+ type VersionListParams,
24
+ type VersionDeleteParams,
25
+ type VersionListResponsesPageCursor,
26
+ } from './versions';