@anthropic-ai/sdk 0.117.1 → 0.118.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.
- package/CHANGELOG.md +28 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +1 -0
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +1 -0
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js +7 -2
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +8 -3
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +1 -0
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +1 -0
- package/core/error.d.ts.map +1 -1
- package/core/error.js +1 -0
- package/core/error.js.map +1 -1
- package/core/error.mjs +1 -0
- package/core/error.mjs.map +1 -1
- package/core/middleware.js +1 -1
- package/core/middleware.js.map +1 -1
- package/core/middleware.mjs +2 -2
- package/core/middleware.mjs.map +1 -1
- package/helpers/beta/zod.d.mts.map +1 -1
- package/helpers/beta/zod.d.ts.map +1 -1
- package/helpers/beta/zod.js +1 -2
- package/helpers/beta/zod.js.map +1 -1
- package/helpers/beta/zod.mjs +1 -2
- package/helpers/beta/zod.mjs.map +1 -1
- package/helpers/zod.d.mts.map +1 -1
- package/helpers/zod.d.ts.map +1 -1
- package/helpers/zod.js +1 -2
- package/helpers/zod.js.map +1 -1
- package/helpers/zod.mjs +1 -2
- package/helpers/zod.mjs.map +1 -1
- package/internal/parse.d.mts +2 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +6 -6
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -5
- package/internal/parse.mjs.map +1 -1
- package/lib/BetaMessageStream.d.mts +2 -0
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts +2 -0
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +8 -2
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +8 -2
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/MessageStream.d.mts +2 -0
- package/lib/MessageStream.d.mts.map +1 -1
- package/lib/MessageStream.d.ts +2 -0
- package/lib/MessageStream.d.ts.map +1 -1
- package/lib/MessageStream.js +8 -2
- package/lib/MessageStream.js.map +1 -1
- package/lib/MessageStream.mjs +8 -2
- package/lib/MessageStream.mjs.map +1 -1
- package/lib/environments/worker.d.mts +10 -6
- package/lib/environments/worker.d.mts.map +1 -1
- package/lib/environments/worker.d.ts +10 -6
- package/lib/environments/worker.d.ts.map +1 -1
- package/lib/environments/worker.js +22 -15
- package/lib/environments/worker.js.map +1 -1
- package/lib/environments/worker.mjs +22 -15
- package/lib/environments/worker.mjs.map +1 -1
- package/lib/tools/BetaRunnableTool.d.mts +20 -42
- package/lib/tools/BetaRunnableTool.d.mts.map +1 -1
- package/lib/tools/BetaRunnableTool.d.ts +20 -42
- package/lib/tools/BetaRunnableTool.d.ts.map +1 -1
- package/lib/tools/BetaRunnableTool.js +3 -17
- package/lib/tools/BetaRunnableTool.js.map +1 -1
- package/lib/tools/BetaRunnableTool.mjs +3 -17
- package/lib/tools/BetaRunnableTool.mjs.map +1 -1
- package/lib/tools/BetaToolRunner.d.mts.map +1 -1
- package/lib/tools/BetaToolRunner.d.ts.map +1 -1
- package/lib/tools/BetaToolRunner.js +0 -12
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +0 -12
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/lib/tools/SessionToolRunner.d.mts +6 -0
- package/lib/tools/SessionToolRunner.d.mts.map +1 -1
- package/lib/tools/SessionToolRunner.d.ts +6 -0
- package/lib/tools/SessionToolRunner.d.ts.map +1 -1
- package/lib/tools/SessionToolRunner.js +37 -8
- package/lib/tools/SessionToolRunner.js.map +1 -1
- package/lib/tools/SessionToolRunner.mjs +38 -9
- package/lib/tools/SessionToolRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +3 -3
- package/resources/beta/agents/agents.d.ts +3 -3
- package/resources/beta/agents/agents.js +1 -1
- package/resources/beta/agents/agents.mjs +1 -1
- package/resources/beta/beta.d.mts +3 -3
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +3 -3
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/dreams.d.mts +2 -2
- package/resources/beta/dreams.d.ts +2 -2
- package/resources/beta/environments/environments.d.mts +4 -3
- package/resources/beta/environments/environments.d.mts.map +1 -1
- package/resources/beta/environments/environments.d.ts +4 -3
- package/resources/beta/environments/environments.d.ts.map +1 -1
- package/resources/beta/environments/environments.js.map +1 -1
- package/resources/beta/environments/environments.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/memory-stores/index.d.mts +1 -1
- package/resources/beta/memory-stores/index.d.mts.map +1 -1
- package/resources/beta/memory-stores/index.d.ts +1 -1
- package/resources/beta/memory-stores/index.d.ts.map +1 -1
- package/resources/beta/memory-stores/index.js.map +1 -1
- package/resources/beta/memory-stores/index.mjs.map +1 -1
- package/resources/beta/memory-stores/memory-stores.d.mts +2 -2
- package/resources/beta/memory-stores/memory-stores.d.mts.map +1 -1
- package/resources/beta/memory-stores/memory-stores.d.ts +2 -2
- package/resources/beta/memory-stores/memory-stores.d.ts.map +1 -1
- package/resources/beta/memory-stores/memory-stores.js.map +1 -1
- package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.mts +17 -2
- package/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.ts +17 -2
- package/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
- package/resources/beta/messages/batches.d.mts +1 -1
- package/resources/beta/messages/batches.d.ts +1 -1
- package/resources/beta/messages/batches.js +1 -1
- package/resources/beta/messages/batches.mjs +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +4 -22
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +4 -22
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +1 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +1 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +1 -1
- package/resources/beta/sessions/sessions.d.ts +1 -1
- package/resources/beta/user-profiles.d.mts +35 -9
- package/resources/beta/user-profiles.d.mts.map +1 -1
- package/resources/beta/user-profiles.d.ts +35 -9
- package/resources/beta/user-profiles.d.ts.map +1 -1
- package/resources/beta/user-profiles.js +5 -5
- package/resources/beta/user-profiles.mjs +5 -5
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/batches.d.mts +1 -1
- package/resources/messages/batches.d.ts +1 -1
- package/resources/messages/batches.js +1 -1
- package/resources/messages/batches.mjs +1 -1
- package/resources/messages/index.d.mts +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +4 -22
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +4 -22
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/src/client.ts +1 -3
- package/src/core/api-promise.ts +14 -4
- package/src/core/error.ts +2 -0
- package/src/core/middleware.ts +2 -2
- package/src/helpers/beta/zod.ts +1 -3
- package/src/helpers/zod.ts +1 -3
- package/src/internal/parse.ts +6 -6
- package/src/lib/BetaMessageStream.ts +8 -0
- package/src/lib/MessageStream.ts +8 -0
- package/src/lib/environments/worker.ts +28 -14
- package/src/lib/tools/BetaRunnableTool.ts +20 -44
- package/src/lib/tools/BetaToolRunner.ts +0 -12
- package/src/lib/tools/SessionToolRunner.ts +39 -6
- package/src/resources/beta/agents/agents.ts +3 -3
- package/src/resources/beta/beta.ts +1 -2
- package/src/resources/beta/dreams.ts +2 -2
- package/src/resources/beta/environments/environments.ts +4 -3
- package/src/resources/beta/index.ts +0 -1
- package/src/resources/beta/memory-stores/index.ts +1 -0
- package/src/resources/beta/memory-stores/memory-stores.ts +2 -0
- package/src/resources/beta/memory-stores/memory-versions.ts +21 -1
- package/src/resources/beta/messages/batches.ts +1 -1
- package/src/resources/beta/messages/index.ts +0 -1
- package/src/resources/beta/messages/messages.ts +2 -25
- package/src/resources/beta/sessions/sessions.ts +1 -1
- package/src/resources/beta/user-profiles.ts +44 -15
- package/src/resources/index.ts +0 -1
- package/src/resources/messages/batches.ts +1 -1
- package/src/resources/messages/index.ts +0 -1
- package/src/resources/messages/messages.ts +3 -26
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -117,7 +117,8 @@ export type BetaManagedAgentsMemoryVersionsPageCursor = PageCursor<BetaManagedAg
|
|
|
117
117
|
export type BetaManagedAgentsActor =
|
|
118
118
|
| BetaManagedAgentsSessionActor
|
|
119
119
|
| BetaManagedAgentsAPIActor
|
|
120
|
-
| BetaManagedAgentsUserActor
|
|
120
|
+
| BetaManagedAgentsUserActor
|
|
121
|
+
| BetaManagedAgentsServiceAccountActor;
|
|
121
122
|
|
|
122
123
|
/**
|
|
123
124
|
* Attribution for a write made directly via the public API (outside of any
|
|
@@ -228,6 +229,19 @@ export interface BetaManagedAgentsMemoryVersion {
|
|
|
228
229
|
*/
|
|
229
230
|
export type BetaManagedAgentsMemoryVersionOperation = 'created' | 'modified' | 'deleted';
|
|
230
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Attribution for a write made by a workload authenticated as a service account,
|
|
234
|
+
* for example via Workload Identity Federation.
|
|
235
|
+
*/
|
|
236
|
+
export interface BetaManagedAgentsServiceAccountActor {
|
|
237
|
+
/**
|
|
238
|
+
* ID of the service account that performed the write (a `svac_...` value).
|
|
239
|
+
*/
|
|
240
|
+
service_account_id: string;
|
|
241
|
+
|
|
242
|
+
type: 'service_account_actor';
|
|
243
|
+
}
|
|
244
|
+
|
|
231
245
|
/**
|
|
232
246
|
* Attribution for a write made by an agent during a session, through the mounted
|
|
233
247
|
* filesystem at `/mnt/memory/`.
|
|
@@ -298,6 +312,11 @@ export interface MemoryVersionListParams extends PageCursorParams {
|
|
|
298
312
|
*/
|
|
299
313
|
operation?: BetaManagedAgentsMemoryVersionOperation;
|
|
300
314
|
|
|
315
|
+
/**
|
|
316
|
+
* Query param: Query parameter for service_account_id
|
|
317
|
+
*/
|
|
318
|
+
service_account_id?: string;
|
|
319
|
+
|
|
301
320
|
/**
|
|
302
321
|
* Query param: Query parameter for session_id
|
|
303
322
|
*/
|
|
@@ -332,6 +351,7 @@ export declare namespace MemoryVersions {
|
|
|
332
351
|
type BetaManagedAgentsAPIActor as BetaManagedAgentsAPIActor,
|
|
333
352
|
type BetaManagedAgentsMemoryVersion as BetaManagedAgentsMemoryVersion,
|
|
334
353
|
type BetaManagedAgentsMemoryVersionOperation as BetaManagedAgentsMemoryVersionOperation,
|
|
354
|
+
type BetaManagedAgentsServiceAccountActor as BetaManagedAgentsServiceAccountActor,
|
|
335
355
|
type BetaManagedAgentsSessionActor as BetaManagedAgentsSessionActor,
|
|
336
356
|
type BetaManagedAgentsUserActor as BetaManagedAgentsUserActor,
|
|
337
357
|
type BetaManagedAgentsMemoryVersionsPageCursor as BetaManagedAgentsMemoryVersionsPageCursor,
|
|
@@ -70,7 +70,7 @@ export class Messages extends APIResource {
|
|
|
70
70
|
* const betaMessage = await client.beta.messages.create({
|
|
71
71
|
* max_tokens: 1024,
|
|
72
72
|
* messages: [{ content: 'Hello, world', role: 'user' }],
|
|
73
|
-
* model: 'claude-opus-
|
|
73
|
+
* model: 'claude-opus-5',
|
|
74
74
|
* });
|
|
75
75
|
* ```
|
|
76
76
|
*/
|
|
@@ -192,7 +192,7 @@ export class Messages extends APIResource {
|
|
|
192
192
|
* const betaMessageTokensCount =
|
|
193
193
|
* await client.beta.messages.countTokens({
|
|
194
194
|
* messages: [{ content: 'Hello, world', role: 'user' }],
|
|
195
|
-
* model: 'claude-opus-
|
|
195
|
+
* model: 'claude-opus-5',
|
|
196
196
|
* });
|
|
197
197
|
* ```
|
|
198
198
|
*/
|
|
@@ -1419,7 +1419,6 @@ export type BetaContentBlockParam =
|
|
|
1419
1419
|
| BetaRequestMCPToolResultBlockParam
|
|
1420
1420
|
| BetaContainerUploadBlockParam
|
|
1421
1421
|
| BetaCompactionBlockParam
|
|
1422
|
-
| BetaMidConversationSystemBlockParam
|
|
1423
1422
|
| BetaRequestToolAdditionBlock
|
|
1424
1423
|
| BetaRequestToolRemovalBlock
|
|
1425
1424
|
| BetaFallbackBlockParam;
|
|
@@ -2418,27 +2417,6 @@ export interface BetaMetadata {
|
|
|
2418
2417
|
user_id?: string | null;
|
|
2419
2418
|
}
|
|
2420
2419
|
|
|
2421
|
-
/**
|
|
2422
|
-
* System instructions that appear mid-conversation.
|
|
2423
|
-
*
|
|
2424
|
-
* Use this block to provide or update system-level instructions at a specific
|
|
2425
|
-
* point in the conversation, rather than only via the top-level `system`
|
|
2426
|
-
* parameter.
|
|
2427
|
-
*/
|
|
2428
|
-
export interface BetaMidConversationSystemBlockParam {
|
|
2429
|
-
/**
|
|
2430
|
-
* System instruction text blocks.
|
|
2431
|
-
*/
|
|
2432
|
-
content: Array<BetaTextBlockParam | BetaRequestToolAdditionBlock | BetaRequestToolRemovalBlock>;
|
|
2433
|
-
|
|
2434
|
-
type: 'mid_conv_system';
|
|
2435
|
-
|
|
2436
|
-
/**
|
|
2437
|
-
* Create a cache control breakpoint at this content block.
|
|
2438
|
-
*/
|
|
2439
|
-
cache_control?: BetaCacheControlEphemeral | null;
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
2420
|
export interface BetaOutputConfig {
|
|
2443
2421
|
/**
|
|
2444
2422
|
* All possible effort levels.
|
|
@@ -5560,7 +5538,6 @@ export declare namespace Messages {
|
|
|
5560
5538
|
type BetaMessageParam as BetaMessageParam,
|
|
5561
5539
|
type BetaMessageTokensCount as BetaMessageTokensCount,
|
|
5562
5540
|
type BetaMetadata as BetaMetadata,
|
|
5563
|
-
type BetaMidConversationSystemBlockParam as BetaMidConversationSystemBlockParam,
|
|
5564
5541
|
type BetaOutputConfig as BetaOutputConfig,
|
|
5565
5542
|
type BetaOutputTokensDetails as BetaOutputTokensDetails,
|
|
5566
5543
|
type BetaPlainTextSource as BetaPlainTextSource,
|
|
@@ -370,7 +370,7 @@ export interface BetaManagedAgentsAgentWithOverridesParams {
|
|
|
370
370
|
mcp_servers?: Array<AgentsAPI.BetaManagedAgentsURLMCPServerParams>;
|
|
371
371
|
|
|
372
372
|
/**
|
|
373
|
-
* Replacement model. Accepts the model string, e.g. `claude-opus-
|
|
373
|
+
* Replacement model. Accepts the model string, e.g. `claude-opus-5`, or a
|
|
374
374
|
* `model_config` object. Omit to use the agent's model.
|
|
375
375
|
*/
|
|
376
376
|
model?: AgentsAPI.BetaManagedAgentsModel | AgentsAPI.BetaManagedAgentsModelConfigParams;
|
|
@@ -24,7 +24,7 @@ export class UserProfiles extends APIResource {
|
|
|
24
24
|
body,
|
|
25
25
|
...options,
|
|
26
26
|
headers: buildHeaders([
|
|
27
|
-
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-
|
|
27
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString() },
|
|
28
28
|
options?.headers,
|
|
29
29
|
]),
|
|
30
30
|
});
|
|
@@ -50,7 +50,7 @@ export class UserProfiles extends APIResource {
|
|
|
50
50
|
return this._client.get(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
51
51
|
...options,
|
|
52
52
|
headers: buildHeaders([
|
|
53
|
-
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-
|
|
53
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString() },
|
|
54
54
|
options?.headers,
|
|
55
55
|
]),
|
|
56
56
|
});
|
|
@@ -77,7 +77,7 @@ export class UserProfiles extends APIResource {
|
|
|
77
77
|
body,
|
|
78
78
|
...options,
|
|
79
79
|
headers: buildHeaders([
|
|
80
|
-
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-
|
|
80
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString() },
|
|
81
81
|
options?.headers,
|
|
82
82
|
]),
|
|
83
83
|
});
|
|
@@ -103,7 +103,7 @@ export class UserProfiles extends APIResource {
|
|
|
103
103
|
query,
|
|
104
104
|
...options,
|
|
105
105
|
headers: buildHeaders([
|
|
106
|
-
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-
|
|
106
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString() },
|
|
107
107
|
options?.headers,
|
|
108
108
|
]),
|
|
109
109
|
});
|
|
@@ -129,7 +129,7 @@ export class UserProfiles extends APIResource {
|
|
|
129
129
|
return this._client.post(path`/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
130
130
|
...options,
|
|
131
131
|
headers: buildHeaders([
|
|
132
|
-
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-
|
|
132
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString() },
|
|
133
133
|
options?.headers,
|
|
134
134
|
]),
|
|
135
135
|
});
|
|
@@ -155,13 +155,6 @@ export interface BetaUserProfile {
|
|
|
155
155
|
*/
|
|
156
156
|
metadata: { [key: string]: string };
|
|
157
157
|
|
|
158
|
-
/**
|
|
159
|
-
* How the entity behind a user profile relates to the platform that owns the API
|
|
160
|
-
* key. `external`: an individual end-user of the platform. `resold`: a company the
|
|
161
|
-
* platform resells Claude access to. `internal`: the platform's own usage.
|
|
162
|
-
*/
|
|
163
|
-
relationship: 'external' | 'resold' | 'internal';
|
|
164
|
-
|
|
165
158
|
/**
|
|
166
159
|
* Trust grants for this profile, keyed by grant name. Key omitted when no grant is
|
|
167
160
|
* active or in flight.
|
|
@@ -178,6 +171,15 @@ export interface BetaUserProfile {
|
|
|
178
171
|
*/
|
|
179
172
|
updated_at: string;
|
|
180
173
|
|
|
174
|
+
/**
|
|
175
|
+
* How the platform uses the API on behalf of the entity this profile represents.
|
|
176
|
+
* `application`: the platform sells a product that uses the API behind the scenes,
|
|
177
|
+
* and the profile represents an individual end-user of that product.
|
|
178
|
+
* `passthrough`: the platform resells raw inference, and the profile identifies
|
|
179
|
+
* the resold-to company.
|
|
180
|
+
*/
|
|
181
|
+
access_type?: 'application' | 'passthrough';
|
|
182
|
+
|
|
181
183
|
/**
|
|
182
184
|
* Platform's own identifier for this user. Not enforced unique.
|
|
183
185
|
*/
|
|
@@ -185,9 +187,17 @@ export interface BetaUserProfile {
|
|
|
185
187
|
|
|
186
188
|
/**
|
|
187
189
|
* Real-world name of the entity this profile represents (company or individual).
|
|
188
|
-
* For
|
|
190
|
+
* For a resold-to company (`access_type` `passthrough`, or `relationship` `resold`
|
|
191
|
+
* under the `user-profiles-2026-03-24` header) this is that company's name.
|
|
189
192
|
*/
|
|
190
193
|
name?: string | null;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* How the entity behind a user profile relates to the platform that owns the API
|
|
197
|
+
* key. `external`: an individual end-user of the platform. `resold`: a company the
|
|
198
|
+
* platform resells Claude access to. `internal`: the platform's own usage.
|
|
199
|
+
*/
|
|
200
|
+
relationship?: 'external' | 'resold' | 'internal';
|
|
191
201
|
}
|
|
192
202
|
|
|
193
203
|
export interface BetaUserProfileEnrollmentURL {
|
|
@@ -215,6 +225,15 @@ export interface BetaUserProfileTrustGrant {
|
|
|
215
225
|
}
|
|
216
226
|
|
|
217
227
|
export interface UserProfileCreateParams {
|
|
228
|
+
/**
|
|
229
|
+
* Body param: How the platform uses the API on behalf of the entity this profile
|
|
230
|
+
* represents. `application`: the platform sells a product that uses the API behind
|
|
231
|
+
* the scenes, and the profile represents an individual end-user of that product.
|
|
232
|
+
* `passthrough`: the platform resells raw inference, and the profile identifies
|
|
233
|
+
* the resold-to company.
|
|
234
|
+
*/
|
|
235
|
+
access_type?: 'application' | 'passthrough';
|
|
236
|
+
|
|
218
237
|
/**
|
|
219
238
|
* Body param: Platform's own identifier for this user. Not enforced unique.
|
|
220
239
|
* Maximum 255 characters.
|
|
@@ -230,8 +249,9 @@ export interface UserProfileCreateParams {
|
|
|
230
249
|
|
|
231
250
|
/**
|
|
232
251
|
* Body param: Optional for all profiles. Real-world name of the entity this
|
|
233
|
-
* profile represents (company or individual); for
|
|
234
|
-
*
|
|
252
|
+
* profile represents (company or individual); for a resold-to company
|
|
253
|
+
* (`relationship` `resold` / `access_type` `passthrough`), that company's name
|
|
254
|
+
* where known. Maximum 255 characters.
|
|
235
255
|
*/
|
|
236
256
|
name?: string | null;
|
|
237
257
|
|
|
@@ -257,6 +277,15 @@ export interface UserProfileRetrieveParams {
|
|
|
257
277
|
}
|
|
258
278
|
|
|
259
279
|
export interface UserProfileUpdateParams {
|
|
280
|
+
/**
|
|
281
|
+
* Body param: How the platform uses the API on behalf of the entity this profile
|
|
282
|
+
* represents. `application`: the platform sells a product that uses the API behind
|
|
283
|
+
* the scenes, and the profile represents an individual end-user of that product.
|
|
284
|
+
* `passthrough`: the platform resells raw inference, and the profile identifies
|
|
285
|
+
* the resold-to company.
|
|
286
|
+
*/
|
|
287
|
+
access_type?: 'application' | 'passthrough' | null;
|
|
288
|
+
|
|
260
289
|
/**
|
|
261
290
|
* Body param: If present, replaces the stored external_id. Omit to leave
|
|
262
291
|
* unchanged. Maximum 255 characters.
|
package/src/resources/index.ts
CHANGED
|
@@ -51,7 +51,7 @@ export class Messages extends APIResource {
|
|
|
51
51
|
* const message = await client.messages.create({
|
|
52
52
|
* max_tokens: 1024,
|
|
53
53
|
* messages: [{ content: 'Hello, world', role: 'user' }],
|
|
54
|
-
* model: 'claude-opus-
|
|
54
|
+
* model: 'claude-opus-5',
|
|
55
55
|
* });
|
|
56
56
|
* ```
|
|
57
57
|
*/
|
|
@@ -181,7 +181,7 @@ export class Messages extends APIResource {
|
|
|
181
181
|
* const messageTokensCount =
|
|
182
182
|
* await client.messages.countTokens({
|
|
183
183
|
* messages: [{ content: 'Hello, world', role: 'user' }],
|
|
184
|
-
* model: 'claude-opus-
|
|
184
|
+
* model: 'claude-opus-5',
|
|
185
185
|
* });
|
|
186
186
|
* ```
|
|
187
187
|
*/
|
|
@@ -877,8 +877,7 @@ export type ContentBlockParam =
|
|
|
877
877
|
| BashCodeExecutionToolResultBlockParam
|
|
878
878
|
| TextEditorCodeExecutionToolResultBlockParam
|
|
879
879
|
| ToolSearchToolResultBlockParam
|
|
880
|
-
| ContainerUploadBlockParam
|
|
881
|
-
| MidConversationSystemBlockParam;
|
|
880
|
+
| ContainerUploadBlockParam;
|
|
882
881
|
|
|
883
882
|
export interface ContentBlockSource {
|
|
884
883
|
content: string | Array<ContentBlockSourceContent>;
|
|
@@ -1229,27 +1228,6 @@ export interface Metadata {
|
|
|
1229
1228
|
user_id?: string | null;
|
|
1230
1229
|
}
|
|
1231
1230
|
|
|
1232
|
-
/**
|
|
1233
|
-
* System instructions that appear mid-conversation.
|
|
1234
|
-
*
|
|
1235
|
-
* Use this block to provide or update system-level instructions at a specific
|
|
1236
|
-
* point in the conversation, rather than only via the top-level `system`
|
|
1237
|
-
* parameter.
|
|
1238
|
-
*/
|
|
1239
|
-
export interface MidConversationSystemBlockParam {
|
|
1240
|
-
/**
|
|
1241
|
-
* System instruction text blocks.
|
|
1242
|
-
*/
|
|
1243
|
-
content: Array<TextBlockParam>;
|
|
1244
|
-
|
|
1245
|
-
type: 'mid_conv_system';
|
|
1246
|
-
|
|
1247
|
-
/**
|
|
1248
|
-
* Create a cache control breakpoint at this content block.
|
|
1249
|
-
*/
|
|
1250
|
-
cache_control?: CacheControlEphemeral | null;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
1231
|
/**
|
|
1254
1232
|
* The model that will complete your prompt.
|
|
1255
1233
|
*
|
|
@@ -3690,7 +3668,6 @@ export declare namespace Messages {
|
|
|
3690
3668
|
type MessageParam as MessageParam,
|
|
3691
3669
|
type MessageTokensCount as MessageTokensCount,
|
|
3692
3670
|
type Metadata as Metadata,
|
|
3693
|
-
type MidConversationSystemBlockParam as MidConversationSystemBlockParam,
|
|
3694
3671
|
type Model as Model,
|
|
3695
3672
|
type OutputConfig as OutputConfig,
|
|
3696
3673
|
type OutputTokensDetails as OutputTokensDetails,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.118.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.118.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.118.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.118.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|