@anthropic-ai/sdk 0.109.1 → 0.111.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 (77) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/lib/tools/SessionToolRunner.d.mts +29 -2
  3. package/lib/tools/SessionToolRunner.d.mts.map +1 -1
  4. package/lib/tools/SessionToolRunner.d.ts +29 -2
  5. package/lib/tools/SessionToolRunner.d.ts.map +1 -1
  6. package/lib/tools/SessionToolRunner.js +265 -36
  7. package/lib/tools/SessionToolRunner.js.map +1 -1
  8. package/lib/tools/SessionToolRunner.mjs +265 -36
  9. package/lib/tools/SessionToolRunner.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/beta/agents/agents.d.mts +1 -1
  12. package/resources/beta/agents/agents.d.ts +1 -1
  13. package/resources/beta/beta.d.mts +5 -1
  14. package/resources/beta/beta.d.mts.map +1 -1
  15. package/resources/beta/beta.d.ts +5 -1
  16. package/resources/beta/beta.d.ts.map +1 -1
  17. package/resources/beta/beta.js +4 -0
  18. package/resources/beta/beta.js.map +1 -1
  19. package/resources/beta/beta.mjs +4 -0
  20. package/resources/beta/beta.mjs.map +1 -1
  21. package/resources/beta/dreams.d.mts +269 -0
  22. package/resources/beta/dreams.d.mts.map +1 -0
  23. package/resources/beta/dreams.d.ts +269 -0
  24. package/resources/beta/dreams.d.ts.map +1 -0
  25. package/resources/beta/dreams.js +116 -0
  26. package/resources/beta/dreams.js.map +1 -0
  27. package/resources/beta/dreams.mjs +112 -0
  28. package/resources/beta/dreams.mjs.map +1 -0
  29. package/resources/beta/index.d.mts +1 -0
  30. package/resources/beta/index.d.mts.map +1 -1
  31. package/resources/beta/index.d.ts +1 -0
  32. package/resources/beta/index.d.ts.map +1 -1
  33. package/resources/beta/index.js +3 -1
  34. package/resources/beta/index.js.map +1 -1
  35. package/resources/beta/index.mjs +1 -0
  36. package/resources/beta/index.mjs.map +1 -1
  37. package/resources/beta/memory-stores/memories.d.mts +0 -8
  38. package/resources/beta/memory-stores/memories.d.mts.map +1 -1
  39. package/resources/beta/memory-stores/memories.d.ts +0 -8
  40. package/resources/beta/memory-stores/memories.d.ts.map +1 -1
  41. package/resources/beta/memory-stores/memories.js +5 -5
  42. package/resources/beta/memory-stores/memories.js.map +1 -1
  43. package/resources/beta/memory-stores/memories.mjs +5 -5
  44. package/resources/beta/memory-stores/memories.mjs.map +1 -1
  45. package/resources/beta/memory-stores/memory-stores.js +6 -6
  46. package/resources/beta/memory-stores/memory-stores.js.map +1 -1
  47. package/resources/beta/memory-stores/memory-stores.mjs +6 -6
  48. package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
  49. package/resources/beta/memory-stores/memory-versions.js +3 -3
  50. package/resources/beta/memory-stores/memory-versions.js.map +1 -1
  51. package/resources/beta/memory-stores/memory-versions.mjs +3 -3
  52. package/resources/beta/memory-stores/memory-versions.mjs.map +1 -1
  53. package/resources/beta/messages/batches.d.mts +3 -2
  54. package/resources/beta/messages/batches.d.mts.map +1 -1
  55. package/resources/beta/messages/batches.d.ts +3 -2
  56. package/resources/beta/messages/batches.d.ts.map +1 -1
  57. package/resources/beta/messages/messages.d.mts +18 -9
  58. package/resources/beta/messages/messages.d.mts.map +1 -1
  59. package/resources/beta/messages/messages.d.ts +18 -9
  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/src/lib/tools/SessionToolRunner.ts +280 -36
  64. package/src/resources/beta/agents/agents.ts +1 -1
  65. package/src/resources/beta/beta.ts +47 -1
  66. package/src/resources/beta/dreams.ts +404 -0
  67. package/src/resources/beta/index.ts +20 -0
  68. package/src/resources/beta/memory-stores/memories.ts +5 -15
  69. package/src/resources/beta/memory-stores/memory-stores.ts +6 -6
  70. package/src/resources/beta/memory-stores/memory-versions.ts +3 -3
  71. package/src/resources/beta/messages/batches.ts +3 -2
  72. package/src/resources/beta/messages/messages.ts +18 -9
  73. package/src/version.ts +1 -1
  74. package/version.d.mts +1 -1
  75. package/version.d.ts +1 -1
  76. package/version.js +1 -1
  77. package/version.mjs +1 -1
@@ -0,0 +1,404 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as BetaAPI from './beta';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { PageCursor, type PageCursorParams, PagePromise } from '../../core/pagination';
7
+ import { buildHeaders } from '../../internal/headers';
8
+ import { RequestOptions } from '../../internal/request-options';
9
+ import { path } from '../../internal/utils/path';
10
+
11
+ export class Dreams extends APIResource {
12
+ /**
13
+ * Create a Dream
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const betaDream = await client.beta.dreams.create({
18
+ * inputs: [{ memory_store_id: 'x', type: 'memory_store' }],
19
+ * model: 'string',
20
+ * });
21
+ * ```
22
+ */
23
+ create(params: DreamCreateParams, options?: RequestOptions): APIPromise<BetaDream> {
24
+ const { betas, ...body } = params;
25
+ return this._client.post('/v1/dreams?beta=true', {
26
+ body,
27
+ ...options,
28
+ headers: buildHeaders([
29
+ { 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
30
+ options?.headers,
31
+ ]),
32
+ });
33
+ }
34
+
35
+ /**
36
+ * Get a Dream
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const betaDream = await client.beta.dreams.retrieve(
41
+ * 'dream_id',
42
+ * );
43
+ * ```
44
+ */
45
+ retrieve(
46
+ dreamID: string,
47
+ params: DreamRetrieveParams | null | undefined = {},
48
+ options?: RequestOptions,
49
+ ): APIPromise<BetaDream> {
50
+ const { betas } = params ?? {};
51
+ return this._client.get(path`/v1/dreams/${dreamID}?beta=true`, {
52
+ ...options,
53
+ headers: buildHeaders([
54
+ { 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
55
+ options?.headers,
56
+ ]),
57
+ });
58
+ }
59
+
60
+ /**
61
+ * List Dreams
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * // Automatically fetches more pages as needed.
66
+ * for await (const betaDream of client.beta.dreams.list()) {
67
+ * // ...
68
+ * }
69
+ * ```
70
+ */
71
+ list(
72
+ params: DreamListParams | null | undefined = {},
73
+ options?: RequestOptions,
74
+ ): PagePromise<BetaDreamsPageCursor, BetaDream> {
75
+ const { betas, ...query } = params ?? {};
76
+ return this._client.getAPIList('/v1/dreams?beta=true', PageCursor<BetaDream>, {
77
+ query,
78
+ ...options,
79
+ headers: buildHeaders([
80
+ { 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
81
+ options?.headers,
82
+ ]),
83
+ });
84
+ }
85
+
86
+ /**
87
+ * Archive a Dream
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * const betaDream = await client.beta.dreams.archive(
92
+ * 'dream_id',
93
+ * );
94
+ * ```
95
+ */
96
+ archive(
97
+ dreamID: string,
98
+ params: DreamArchiveParams | null | undefined = {},
99
+ options?: RequestOptions,
100
+ ): APIPromise<BetaDream> {
101
+ const { betas } = params ?? {};
102
+ return this._client.post(path`/v1/dreams/${dreamID}/archive?beta=true`, {
103
+ ...options,
104
+ headers: buildHeaders([
105
+ { 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
106
+ options?.headers,
107
+ ]),
108
+ });
109
+ }
110
+
111
+ /**
112
+ * Cancel a Dream
113
+ *
114
+ * @example
115
+ * ```ts
116
+ * const betaDream = await client.beta.dreams.cancel(
117
+ * 'dream_id',
118
+ * );
119
+ * ```
120
+ */
121
+ cancel(
122
+ dreamID: string,
123
+ params: DreamCancelParams | null | undefined = {},
124
+ options?: RequestOptions,
125
+ ): APIPromise<BetaDream> {
126
+ const { betas } = params ?? {};
127
+ return this._client.post(path`/v1/dreams/${dreamID}/cancel?beta=true`, {
128
+ ...options,
129
+ headers: buildHeaders([
130
+ { 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
131
+ options?.headers,
132
+ ]),
133
+ });
134
+ }
135
+ }
136
+
137
+ export type BetaDreamsPageCursor = PageCursor<BetaDream>;
138
+
139
+ /**
140
+ * An asynchronous memory-consolidation job that reads a memory store plus a set of
141
+ * session transcripts and writes consolidated memories into a new output memory
142
+ * store. The Dreams API is in research preview: the request and response shapes
143
+ * are volatile and may change without the deprecation period that applies to
144
+ * generally-available endpoints.
145
+ */
146
+ export interface BetaDream {
147
+ id: string;
148
+
149
+ /**
150
+ * A timestamp in RFC 3339 format
151
+ */
152
+ archived_at: string | null;
153
+
154
+ /**
155
+ * A timestamp in RFC 3339 format
156
+ */
157
+ created_at: string;
158
+
159
+ /**
160
+ * A timestamp in RFC 3339 format
161
+ */
162
+ ended_at: string | null;
163
+
164
+ /**
165
+ * Failure detail for a Dream whose `status` is `failed`.
166
+ */
167
+ error: BetaDreamError | null;
168
+
169
+ inputs: Array<BetaDreamInput>;
170
+
171
+ instructions: string | null;
172
+
173
+ /**
174
+ * Model identifier and configuration applied to every pipeline stage. Same wire
175
+ * shape as the Agents API ModelConfig.
176
+ */
177
+ model: BetaDreamModelConfig;
178
+
179
+ outputs: Array<BetaDreamOutput>;
180
+
181
+ session_id: string | null;
182
+
183
+ /**
184
+ * Lifecycle status of a Dream.
185
+ */
186
+ status: BetaDreamStatus;
187
+
188
+ type: 'dream';
189
+
190
+ /**
191
+ * Cumulative token usage for the dream across every pipeline stage.
192
+ */
193
+ usage: BetaDreamUsage;
194
+ }
195
+
196
+ /**
197
+ * Failure detail for a Dream whose `status` is `failed`.
198
+ */
199
+ export interface BetaDreamError {
200
+ message: string;
201
+
202
+ type: string;
203
+ }
204
+
205
+ /**
206
+ * An input memory store the dream reads from. The dream never mutates this store.
207
+ */
208
+ export type BetaDreamInput = BetaDreamMemoryStoreInput | BetaDreamSessionsInput;
209
+
210
+ /**
211
+ * An input memory store the dream reads from. The dream never mutates this store.
212
+ */
213
+ export interface BetaDreamMemoryStoreInput {
214
+ memory_store_id: string;
215
+
216
+ type: 'memory_store';
217
+ }
218
+
219
+ /**
220
+ * An output memory store the dream writes consolidated memories into.
221
+ */
222
+ export interface BetaDreamMemoryStoreOutput {
223
+ memory_store_id: string;
224
+
225
+ type: 'memory_store';
226
+ }
227
+
228
+ /**
229
+ * Model identifier and configuration applied to every pipeline stage. Same wire
230
+ * shape as the Agents API ModelConfig.
231
+ */
232
+ export interface BetaDreamModelConfig {
233
+ /**
234
+ * Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
235
+ */
236
+ id: string;
237
+
238
+ /**
239
+ * Inference speed mode. `fast` provides significantly faster output token
240
+ * generation at premium pricing. Not all models support `fast`; invalid
241
+ * combinations are rejected at create time.
242
+ */
243
+ speed?: 'standard' | 'fast';
244
+ }
245
+
246
+ /**
247
+ * Model identifier and configuration applied to every pipeline stage.
248
+ */
249
+ export interface BetaDreamModelConfigParam {
250
+ /**
251
+ * Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
252
+ */
253
+ id: string;
254
+
255
+ /**
256
+ * Inference speed mode. `fast` provides significantly faster output token
257
+ * generation at premium pricing. Not all models support `fast`; invalid
258
+ * combinations are rejected at create time.
259
+ */
260
+ speed?: 'standard' | 'fast' | null;
261
+ }
262
+
263
+ /**
264
+ * An output memory store the dream writes consolidated memories into.
265
+ */
266
+ export interface BetaDreamOutput {
267
+ memory_store_id: string;
268
+
269
+ type: 'memory_store';
270
+ }
271
+
272
+ /**
273
+ * Input session transcripts the dream reads.
274
+ */
275
+ export interface BetaDreamSessionsInput {
276
+ session_ids: Array<string>;
277
+
278
+ type: 'sessions';
279
+ }
280
+
281
+ /**
282
+ * Lifecycle status of a Dream.
283
+ */
284
+ export type BetaDreamStatus = 'pending' | 'running' | 'completed' | 'failed' | 'canceled';
285
+
286
+ /**
287
+ * Cumulative token usage for the dream across every pipeline stage.
288
+ */
289
+ export interface BetaDreamUsage {
290
+ /**
291
+ * Total tokens used to create prompt-cache entries (sum of all TTL tiers).
292
+ */
293
+ cache_creation_input_tokens: number;
294
+
295
+ /**
296
+ * Total tokens read from prompt cache.
297
+ */
298
+ cache_read_input_tokens: number;
299
+
300
+ /**
301
+ * Total uncached input tokens consumed across every pipeline stage.
302
+ */
303
+ input_tokens: number;
304
+
305
+ /**
306
+ * Total output tokens generated across every pipeline stage.
307
+ */
308
+ output_tokens: number;
309
+ }
310
+
311
+ export interface DreamCreateParams {
312
+ /**
313
+ * Body param
314
+ */
315
+ inputs: Array<BetaDreamInput>;
316
+
317
+ /**
318
+ * Body param: Model identifier and configuration applied to every pipeline stage.
319
+ */
320
+ model: string | BetaDreamModelConfigParam;
321
+
322
+ /**
323
+ * Body param
324
+ */
325
+ instructions?: string | null;
326
+
327
+ /**
328
+ * Header param: Optional header to specify the beta version(s) you want to use.
329
+ */
330
+ betas?: Array<BetaAPI.AnthropicBeta>;
331
+ }
332
+
333
+ export interface DreamRetrieveParams {
334
+ /**
335
+ * Optional header to specify the beta version(s) you want to use.
336
+ */
337
+ betas?: Array<BetaAPI.AnthropicBeta>;
338
+ }
339
+
340
+ export interface DreamListParams extends PageCursorParams {
341
+ /**
342
+ * Query param: Return dreams with `created_at` strictly after this timestamp
343
+ * (exclusive lower bound, RFC 3339). Unset applies no lower bound.
344
+ */
345
+ 'created_at[gt]'?: string;
346
+
347
+ /**
348
+ * Query param: Return dreams with `created_at` strictly before this timestamp
349
+ * (exclusive upper bound, RFC 3339). Unset applies no upper bound.
350
+ */
351
+ 'created_at[lt]'?: string;
352
+
353
+ /**
354
+ * Query param: Query parameter for include_archived
355
+ */
356
+ include_archived?: boolean;
357
+
358
+ /**
359
+ * Query param: Filter by lifecycle status. Repeat the parameter to match any of
360
+ * multiple statuses. Empty applies no status filter.
361
+ */
362
+ statuses?: Array<BetaDreamStatus>;
363
+
364
+ /**
365
+ * Header param: Optional header to specify the beta version(s) you want to use.
366
+ */
367
+ betas?: Array<BetaAPI.AnthropicBeta>;
368
+ }
369
+
370
+ export interface DreamArchiveParams {
371
+ /**
372
+ * Optional header to specify the beta version(s) you want to use.
373
+ */
374
+ betas?: Array<BetaAPI.AnthropicBeta>;
375
+ }
376
+
377
+ export interface DreamCancelParams {
378
+ /**
379
+ * Optional header to specify the beta version(s) you want to use.
380
+ */
381
+ betas?: Array<BetaAPI.AnthropicBeta>;
382
+ }
383
+
384
+ export declare namespace Dreams {
385
+ export {
386
+ type BetaDream as BetaDream,
387
+ type BetaDreamError as BetaDreamError,
388
+ type BetaDreamInput as BetaDreamInput,
389
+ type BetaDreamMemoryStoreInput as BetaDreamMemoryStoreInput,
390
+ type BetaDreamMemoryStoreOutput as BetaDreamMemoryStoreOutput,
391
+ type BetaDreamModelConfig as BetaDreamModelConfig,
392
+ type BetaDreamModelConfigParam as BetaDreamModelConfigParam,
393
+ type BetaDreamOutput as BetaDreamOutput,
394
+ type BetaDreamSessionsInput as BetaDreamSessionsInput,
395
+ type BetaDreamStatus as BetaDreamStatus,
396
+ type BetaDreamUsage as BetaDreamUsage,
397
+ type BetaDreamsPageCursor as BetaDreamsPageCursor,
398
+ type DreamCreateParams as DreamCreateParams,
399
+ type DreamRetrieveParams as DreamRetrieveParams,
400
+ type DreamListParams as DreamListParams,
401
+ type DreamArchiveParams as DreamArchiveParams,
402
+ type DreamCancelParams as DreamCancelParams,
403
+ };
404
+ }
@@ -135,6 +135,26 @@ export {
135
135
  type DeploymentUnpauseParams,
136
136
  type BetaManagedAgentsDeploymentsPageCursor,
137
137
  } from './deployments';
138
+ export {
139
+ Dreams,
140
+ type BetaDream,
141
+ type BetaDreamError,
142
+ type BetaDreamInput,
143
+ type BetaDreamMemoryStoreInput,
144
+ type BetaDreamMemoryStoreOutput,
145
+ type BetaDreamModelConfig,
146
+ type BetaDreamModelConfigParam,
147
+ type BetaDreamOutput,
148
+ type BetaDreamSessionsInput,
149
+ type BetaDreamStatus,
150
+ type BetaDreamUsage,
151
+ type DreamCreateParams,
152
+ type DreamRetrieveParams,
153
+ type DreamListParams,
154
+ type DreamArchiveParams,
155
+ type DreamCancelParams,
156
+ type BetaDreamsPageCursor,
157
+ } from './dreams';
138
158
  export {
139
159
  Environments,
140
160
  type BetaCloudConfig,
@@ -32,7 +32,7 @@ export class Memories extends APIResource {
32
32
  body,
33
33
  ...options,
34
34
  headers: buildHeaders([
35
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
35
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
36
36
  options?.headers,
37
37
  ]),
38
38
  });
@@ -60,7 +60,7 @@ export class Memories extends APIResource {
60
60
  query,
61
61
  ...options,
62
62
  headers: buildHeaders([
63
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
63
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
64
64
  options?.headers,
65
65
  ]),
66
66
  });
@@ -89,7 +89,7 @@ export class Memories extends APIResource {
89
89
  body,
90
90
  ...options,
91
91
  headers: buildHeaders([
92
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
92
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
93
93
  options?.headers,
94
94
  ]),
95
95
  });
@@ -121,7 +121,7 @@ export class Memories extends APIResource {
121
121
  query,
122
122
  ...options,
123
123
  headers: buildHeaders([
124
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
124
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
125
125
  options?.headers,
126
126
  ]),
127
127
  },
@@ -150,7 +150,7 @@ export class Memories extends APIResource {
150
150
  query: { expected_content_sha256 },
151
151
  ...options,
152
152
  headers: buildHeaders([
153
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
153
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
154
154
  options?.headers,
155
155
  ]),
156
156
  });
@@ -449,16 +449,6 @@ export interface MemoryListParams extends PageCursorParams {
449
449
  */
450
450
  depth?: number;
451
451
 
452
- /**
453
- * Query param: Query parameter for order
454
- */
455
- order?: 'asc' | 'desc';
456
-
457
- /**
458
- * Query param: Query parameter for order_by
459
- */
460
- order_by?: string;
461
-
462
452
  /**
463
453
  * Query param: Optional path prefix filter. Must end with `/` (segment-aligned),
464
454
  * e.g., `/notes/`. This value appears in request URLs. Do not include secrets or
@@ -65,7 +65,7 @@ export class MemoryStores extends APIResource {
65
65
  body,
66
66
  ...options,
67
67
  headers: buildHeaders([
68
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
68
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
69
69
  options?.headers,
70
70
  ]),
71
71
  });
@@ -91,7 +91,7 @@ export class MemoryStores extends APIResource {
91
91
  return this._client.get(path`/v1/memory_stores/${memoryStoreID}?beta=true`, {
92
92
  ...options,
93
93
  headers: buildHeaders([
94
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
94
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
95
95
  options?.headers,
96
96
  ]),
97
97
  });
@@ -116,7 +116,7 @@ export class MemoryStores extends APIResource {
116
116
  body,
117
117
  ...options,
118
118
  headers: buildHeaders([
119
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
119
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
120
120
  options?.headers,
121
121
  ]),
122
122
  });
@@ -142,7 +142,7 @@ export class MemoryStores extends APIResource {
142
142
  query,
143
143
  ...options,
144
144
  headers: buildHeaders([
145
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
145
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
146
146
  options?.headers,
147
147
  ]),
148
148
  });
@@ -166,7 +166,7 @@ export class MemoryStores extends APIResource {
166
166
  return this._client.delete(path`/v1/memory_stores/${memoryStoreID}?beta=true`, {
167
167
  ...options,
168
168
  headers: buildHeaders([
169
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
169
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
170
170
  options?.headers,
171
171
  ]),
172
172
  });
@@ -190,7 +190,7 @@ export class MemoryStores extends APIResource {
190
190
  return this._client.post(path`/v1/memory_stores/${memoryStoreID}/archive?beta=true`, {
191
191
  ...options,
192
192
  headers: buildHeaders([
193
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
193
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
194
194
  options?.headers,
195
195
  ]),
196
196
  });
@@ -34,7 +34,7 @@ export class MemoryVersions extends APIResource {
34
34
  query,
35
35
  ...options,
36
36
  headers: buildHeaders([
37
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
37
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
38
38
  options?.headers,
39
39
  ]),
40
40
  },
@@ -67,7 +67,7 @@ export class MemoryVersions extends APIResource {
67
67
  query,
68
68
  ...options,
69
69
  headers: buildHeaders([
70
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
70
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
71
71
  options?.headers,
72
72
  ]),
73
73
  },
@@ -97,7 +97,7 @@ export class MemoryVersions extends APIResource {
97
97
  {
98
98
  ...options,
99
99
  headers: buildHeaders([
100
- { 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
100
+ { 'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },
101
101
  options?.headers,
102
102
  ]),
103
103
  },
@@ -657,8 +657,9 @@ export namespace BatchCreateParams {
657
657
  service_tier?: 'auto' | 'standard_only';
658
658
 
659
659
  /**
660
- * The inference speed mode for this request. `"fast"` enables high
661
- * output-tokens-per-second inference.
660
+ * Inference speed mode. `fast` provides significantly faster output token
661
+ * generation at premium pricing. Not all models support `fast`; invalid
662
+ * combinations are rejected at create time.
662
663
  */
663
664
  speed?: 'standard' | 'fast' | null;
664
665
 
@@ -1708,10 +1708,10 @@ export interface BetaFallbackMessageIterationUsage {
1708
1708
  /**
1709
1709
  * One entry in the `fallbacks` chain on a `/v1/messages` request.
1710
1710
  *
1711
- * `model` is required. The four override fields (`max_tokens`, `thinking`,
1712
- * `output_config`, and `speed`) replace the corresponding top-level field for this
1713
- * attempt only and are validated as if the request were made to `model`. Any other
1714
- * key is rejected at parse time.
1711
+ * `model` is required. The override fields (`max_tokens`, `thinking`,
1712
+ * `output_config`, and `speed`) set the corresponding parameter for this attempt
1713
+ * only and are validated as if the request were made to `model`. Any other key is
1714
+ * rejected at parse time.
1715
1715
  */
1716
1716
  export interface BetaFallbackParam {
1717
1717
  /**
@@ -1726,6 +1726,11 @@ export interface BetaFallbackParam {
1726
1726
 
1727
1727
  output_config?: BetaOutputConfig | null;
1728
1728
 
1729
+ /**
1730
+ * Inference speed mode. `fast` provides significantly faster output token
1731
+ * generation at premium pricing. Not all models support `fast`; invalid
1732
+ * combinations are rejected at create time.
1733
+ */
1729
1734
  speed?: 'standard' | 'fast' | null;
1730
1735
 
1731
1736
  thinking?: BetaThinkingConfigEnabled | BetaThinkingConfigDisabled | BetaThinkingConfigAdaptive | null;
@@ -3878,7 +3883,9 @@ export interface BetaUsage {
3878
3883
  service_tier: 'standard' | 'priority' | 'batch' | null;
3879
3884
 
3880
3885
  /**
3881
- * The inference speed mode used for this request.
3886
+ * Inference speed mode. `fast` provides significantly faster output token
3887
+ * generation at premium pricing. Not all models support `fast`; invalid
3888
+ * combinations are rejected at create time.
3882
3889
  */
3883
3890
  speed: 'standard' | 'fast' | null;
3884
3891
  }
@@ -4708,8 +4715,9 @@ export interface MessageCreateParamsBase {
4708
4715
  service_tier?: 'auto' | 'standard_only';
4709
4716
 
4710
4717
  /**
4711
- * Body param: The inference speed mode for this request. `"fast"` enables high
4712
- * output-tokens-per-second inference.
4718
+ * Body param: Inference speed mode. `fast` provides significantly faster output
4719
+ * token generation at premium pricing. Not all models support `fast`; invalid
4720
+ * combinations are rejected at create time.
4713
4721
  */
4714
4722
  speed?: 'standard' | 'fast' | null;
4715
4723
 
@@ -5018,8 +5026,9 @@ export interface MessageCountTokensParams {
5018
5026
  output_format?: BetaJSONOutputFormat | null;
5019
5027
 
5020
5028
  /**
5021
- * Body param: The inference speed mode for this request. `"fast"` enables high
5022
- * output-tokens-per-second inference.
5029
+ * Body param: Inference speed mode. `fast` provides significantly faster output
5030
+ * token generation at premium pricing. Not all models support `fast`; invalid
5031
+ * combinations are rejected at create time.
5023
5032
  */
5024
5033
  speed?: 'standard' | 'fast' | null;
5025
5034
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.109.1'; // x-release-please-version
1
+ export const VERSION = '0.111.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.109.1";
1
+ export declare const VERSION = "0.111.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.109.1";
1
+ export declare const VERSION = "0.111.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.109.1'; // x-release-please-version
4
+ exports.VERSION = '0.111.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.109.1'; // x-release-please-version
1
+ export const VERSION = '0.111.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map