@@ -62,7 +62,7 @@ const DEPRECATED_MODELS: {
6262 'claude-3-7-sonnet-20250219' : 'February 19th, 2026' ,
6363} ;
6464
65- const MODELS_TO_WARN_WITH_THINKING_ENABLED : Model [ ] = [ 'claude-opus-4-6' ] ;
65+ const MODELS_TO_WARN_WITH_THINKING_ENABLED : Model [ ] = [ 'claude-mythos-preview' , 'claude- opus-4-6'] ;
6666
6767export class Messages extends APIResource {
6868 batches : BatchesAPI . Batches = new BatchesAPI . Batches ( this . _client ) ;
@@ -113,7 +113,7 @@ export class Messages extends APIResource {
113113 }
114114
115115 if (
116- body . model in MODELS_TO_WARN_WITH_THINKING_ENABLED &&
116+ MODELS_TO_WARN_WITH_THINKING_ENABLED . includes ( body . model ) &&
117117 body . thinking &&
118118 body . thinking . type === 'enabled'
119119 ) {
@@ -1025,6 +1025,11 @@ export interface BetaCompactionBlock {
10251025 */
10261026 content : string | null ;
10271027
1028+ /**
1029+ * Opaque metadata from prior compaction, to be round-tripped verbatim
1030+ */
1031+ encrypted_content : string | null ;
1032+
10281033 type : 'compaction' ;
10291034}
10301035
@@ -1049,11 +1054,21 @@ export interface BetaCompactionBlockParam {
10491054 * Create a cache control breakpoint at this content block.
10501055 */
10511056 cache_control ?: BetaCacheControlEphemeral | null ;
1057+
1058+ /**
1059+ * Opaque metadata from prior compaction, to be round-tripped verbatim
1060+ */
1061+ encrypted_content ?: string | null ;
10521062}
10531063
10541064export interface BetaCompactionContentBlockDelta {
10551065 content : string | null ;
10561066
1067+ /**
1068+ * Opaque metadata from prior compaction, to be round-tripped verbatim
1069+ */
1070+ encrypted_content : string | null ;
1071+
10571072 type : 'compaction_delta' ;
10581073}
10591074
@@ -1824,13 +1839,18 @@ export interface BetaOutputConfig {
18241839 /**
18251840 * All possible effort levels.
18261841 */
1827- effort ?: 'low' | 'medium' | 'high' | 'max' | null ;
1842+ effort ?: 'low' | 'medium' | 'high' | 'xhigh' | ' max' | null ;
18281843
18291844 /**
18301845 * A schema to specify Claude's output format in responses. See
18311846 * [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
18321847 */
18331848 format ?: BetaJSONOutputFormat | null ;
1849+
1850+ /**
1851+ * User-configurable total token budget across contexts.
1852+ */
1853+ task_budget ?: BetaTokenTaskBudget | null ;
18341854}
18351855
18361856export interface BetaPlainTextSource {
@@ -2453,6 +2473,27 @@ export interface BetaThinkingTurns {
24532473 value : number ;
24542474}
24552475
2476+ /**
2477+ * User-configurable total token budget across contexts.
2478+ */
2479+ export interface BetaTokenTaskBudget {
2480+ /**
2481+ * Total token budget across all contexts in the session.
2482+ */
2483+ total : number ;
2484+
2485+ /**
2486+ * The budget type. Currently only 'tokens' is supported.
2487+ */
2488+ type : 'tokens' ;
2489+
2490+ /**
2491+ * Remaining tokens in the budget. Use this to track usage across contexts when
2492+ * implementing compaction client-side. Defaults to total if not provided.
2493+ */
2494+ remaining ?: number | null ;
2495+ }
2496+
24562497export interface BetaTool {
24572498 /**
24582499 * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
@@ -4008,6 +4049,12 @@ export interface MessageCreateParamsBase {
40084049 */
40094050 top_p ?: number ;
40104051
4052+ /**
4053+ * Body param: The user profile ID to attribute this request to. Use when acting on
4054+ * behalf of a party other than your organization.
4055+ */
4056+ user_profile_id ?: string | null ;
4057+
40114058 /**
40124059 * Header param: Optional header to specify the beta version(s) you want to use.
40134060 */
@@ -4455,6 +4502,7 @@ export declare namespace Messages {
44554502 type BetaThinkingConfigParam as BetaThinkingConfigParam ,
44564503 type BetaThinkingDelta as BetaThinkingDelta ,
44574504 type BetaThinkingTurns as BetaThinkingTurns ,
4505+ type BetaTokenTaskBudget as BetaTokenTaskBudget ,
44584506 type BetaTool as BetaTool ,
44594507 type BetaToolBash20241022 as BetaToolBash20241022 ,
44604508 type BetaToolBash20250124 as BetaToolBash20250124 ,
0 commit comments