@anthropic-ai/sdk 0.89.0 → 0.91.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 +35 -0
- package/bin/migration-config.json +185 -0
- package/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +1 -1
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +1 -1
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/beta.d.mts +13 -5
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +13 -5
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +8 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +8 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.mts +4 -2
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +4 -2
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +13 -9
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +2 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/memory-stores/index.d.mts +4 -0
- package/resources/beta/memory-stores/index.d.mts.map +1 -0
- package/resources/beta/memory-stores/index.d.ts +4 -0
- package/resources/beta/memory-stores/index.d.ts.map +1 -0
- package/resources/beta/memory-stores/index.js +11 -0
- package/resources/beta/memory-stores/index.js.map +1 -0
- package/resources/beta/memory-stores/index.mjs +5 -0
- package/resources/beta/memory-stores/index.mjs.map +1 -0
- package/resources/beta/memory-stores/memories.d.mts +232 -0
- package/resources/beta/memory-stores/memories.d.mts.map +1 -0
- package/resources/beta/memory-stores/memories.d.ts +232 -0
- package/resources/beta/memory-stores/memories.d.ts.map +1 -0
- package/resources/beta/memory-stores/memories.js +130 -0
- package/resources/beta/memory-stores/memories.js.map +1 -0
- package/resources/beta/memory-stores/memories.mjs +126 -0
- package/resources/beta/memory-stores/memories.mjs.map +1 -0
- package/resources/beta/memory-stores/memory-stores.d.mts +187 -0
- package/resources/beta/memory-stores/memory-stores.d.mts.map +1 -0
- package/resources/beta/memory-stores/memory-stores.d.ts +187 -0
- package/resources/beta/memory-stores/memory-stores.d.ts.map +1 -0
- package/resources/beta/memory-stores/memory-stores.js +145 -0
- package/resources/beta/memory-stores/memory-stores.js.map +1 -0
- package/resources/beta/memory-stores/memory-stores.mjs +140 -0
- package/resources/beta/memory-stores/memory-stores.mjs.map +1 -0
- package/resources/beta/memory-stores/memory-versions.d.mts +152 -0
- package/resources/beta/memory-stores/memory-versions.d.mts.map +1 -0
- package/resources/beta/memory-stores/memory-versions.d.ts +152 -0
- package/resources/beta/memory-stores/memory-versions.d.ts.map +1 -0
- package/resources/beta/memory-stores/memory-versions.js +81 -0
- package/resources/beta/memory-stores/memory-versions.js.map +1 -0
- package/resources/beta/memory-stores/memory-versions.mjs +77 -0
- package/resources/beta/memory-stores/memory-versions.mjs.map +1 -0
- package/resources/beta/memory-stores.d.mts +2 -0
- package/resources/beta/memory-stores.d.mts.map +1 -0
- package/resources/beta/memory-stores.d.ts +2 -0
- package/resources/beta/memory-stores.d.ts.map +1 -0
- package/resources/beta/memory-stores.js +6 -0
- package/resources/beta/memory-stores.js.map +1 -0
- package/resources/beta/memory-stores.mjs +3 -0
- package/resources/beta/memory-stores.mjs.map +1 -0
- package/resources/beta/messages/batches.d.mts +5 -0
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +5 -0
- package/resources/beta/messages/batches.d.ts.map +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 +41 -2
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +41 -2
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +2 -2
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +2 -2
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/models.d.mts +4 -0
- package/resources/beta/models.d.mts.map +1 -1
- package/resources/beta/models.d.ts +4 -0
- package/resources/beta/models.d.ts.map +1 -1
- package/resources/beta/sessions/index.d.mts +2 -2
- package/resources/beta/sessions/index.d.mts.map +1 -1
- package/resources/beta/sessions/index.d.ts +2 -2
- package/resources/beta/sessions/index.d.ts.map +1 -1
- package/resources/beta/sessions/index.js.map +1 -1
- package/resources/beta/sessions/index.mjs.map +1 -1
- package/resources/beta/sessions/resources.d.mts +42 -4
- package/resources/beta/sessions/resources.d.mts.map +1 -1
- package/resources/beta/sessions/resources.d.ts +42 -4
- package/resources/beta/sessions/resources.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +24 -4
- package/resources/beta/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/sessions/sessions.d.ts +24 -4
- package/resources/beta/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.js.map +1 -1
- package/resources/beta/sessions/sessions.mjs.map +1 -1
- package/resources/beta/user-profiles.d.mts +187 -0
- package/resources/beta/user-profiles.d.mts.map +1 -0
- package/resources/beta/user-profiles.d.ts +187 -0
- package/resources/beta/user-profiles.d.ts.map +1 -0
- package/resources/beta/user-profiles.js +118 -0
- package/resources/beta/user-profiles.js.map +1 -0
- package/resources/beta/user-profiles.mjs +114 -0
- package/resources/beta/user-profiles.mjs.map +1 -0
- package/resources/completions.d.mts +8 -24
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +8 -24
- package/resources/completions.d.ts.map +1 -1
- package/resources/messages/messages.d.mts +2 -2
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +2 -2
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +2 -2
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +2 -2
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/models.d.mts +4 -0
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +4 -0
- package/resources/models.d.ts.map +1 -1
- package/src/resources/beta/agents/agents.ts +1 -0
- package/src/resources/beta/beta.ts +61 -0
- package/src/resources/beta/index.ts +26 -0
- package/src/resources/beta/memory-stores/index.ts +47 -0
- package/src/resources/beta/memory-stores/memories.ts +399 -0
- package/src/resources/beta/memory-stores/memory-stores.ts +374 -0
- package/src/resources/beta/memory-stores/memory-versions.ts +259 -0
- package/src/resources/beta/memory-stores.ts +3 -0
- package/src/resources/beta/messages/batches.ts +6 -0
- package/src/resources/beta/messages/index.ts +1 -0
- package/src/resources/beta/messages/messages.ts +51 -3
- package/src/resources/beta/models.ts +5 -0
- package/src/resources/beta/sessions/index.ts +2 -0
- package/src/resources/beta/sessions/resources.ts +52 -3
- package/src/resources/beta/sessions/sessions.ts +32 -1
- package/src/resources/beta/user-profiles.ts +283 -0
- package/src/resources/completions.ts +8 -24
- package/src/resources/messages/messages.ts +4 -3
- package/src/resources/models.ts +5 -0
- 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
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as BetaAPI from "./beta.js";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
4
|
+
import { PageCursor, type PageCursorParams, PagePromise } from "../../core/pagination.js";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
export declare class UserProfiles extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create User Profile
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const betaUserProfile =
|
|
13
|
+
* await client.beta.userProfiles.create();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(params: UserProfileCreateParams, options?: RequestOptions): APIPromise<BetaUserProfile>;
|
|
17
|
+
/**
|
|
18
|
+
* Get User Profile
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const betaUserProfile =
|
|
23
|
+
* await client.beta.userProfiles.retrieve(
|
|
24
|
+
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
retrieve(userProfileID: string, params?: UserProfileRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<BetaUserProfile>;
|
|
29
|
+
/**
|
|
30
|
+
* Update User Profile
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const betaUserProfile =
|
|
35
|
+
* await client.beta.userProfiles.update(
|
|
36
|
+
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
update(userProfileID: string, params: UserProfileUpdateParams, options?: RequestOptions): APIPromise<BetaUserProfile>;
|
|
41
|
+
/**
|
|
42
|
+
* List User Profiles
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* // Automatically fetches more pages as needed.
|
|
47
|
+
* for await (const betaUserProfile of client.beta.userProfiles.list()) {
|
|
48
|
+
* // ...
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
list(params?: UserProfileListParams | null | undefined, options?: RequestOptions): PagePromise<BetaUserProfilesPageCursor, BetaUserProfile>;
|
|
53
|
+
/**
|
|
54
|
+
* Create Enrollment URL
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const betaUserProfileEnrollmentURL =
|
|
59
|
+
* await client.beta.userProfiles.createEnrollmentURL(
|
|
60
|
+
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
createEnrollmentURL(userProfileID: string, params?: UserProfileCreateEnrollmentURLParams | null | undefined, options?: RequestOptions): APIPromise<BetaUserProfileEnrollmentURL>;
|
|
65
|
+
}
|
|
66
|
+
export type BetaUserProfilesPageCursor = PageCursor<BetaUserProfile>;
|
|
67
|
+
export interface BetaUserProfile {
|
|
68
|
+
/**
|
|
69
|
+
* Unique identifier for this user profile, prefixed `uprof_`.
|
|
70
|
+
*/
|
|
71
|
+
id: string;
|
|
72
|
+
/**
|
|
73
|
+
* A timestamp in RFC 3339 format
|
|
74
|
+
*/
|
|
75
|
+
created_at: string;
|
|
76
|
+
/**
|
|
77
|
+
* Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up
|
|
78
|
+
* to 512 chars.
|
|
79
|
+
*/
|
|
80
|
+
metadata: {
|
|
81
|
+
[key: string]: string;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Trust grants for this profile, keyed by grant name. Key omitted when no grant is
|
|
85
|
+
* active or in flight.
|
|
86
|
+
*/
|
|
87
|
+
trust_grants: {
|
|
88
|
+
[key: string]: BetaUserProfileTrustGrant;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Object type. Always `user_profile`.
|
|
92
|
+
*/
|
|
93
|
+
type: 'user_profile';
|
|
94
|
+
/**
|
|
95
|
+
* A timestamp in RFC 3339 format
|
|
96
|
+
*/
|
|
97
|
+
updated_at: string;
|
|
98
|
+
/**
|
|
99
|
+
* Platform's own identifier for this user. Not enforced unique.
|
|
100
|
+
*/
|
|
101
|
+
external_id?: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface BetaUserProfileEnrollmentURL {
|
|
104
|
+
/**
|
|
105
|
+
* A timestamp in RFC 3339 format
|
|
106
|
+
*/
|
|
107
|
+
expires_at: string;
|
|
108
|
+
/**
|
|
109
|
+
* Object type. Always `enrollment_url`.
|
|
110
|
+
*/
|
|
111
|
+
type: 'enrollment_url';
|
|
112
|
+
/**
|
|
113
|
+
* Enrollment URL to send to the end user. Valid until `expires_at`.
|
|
114
|
+
*/
|
|
115
|
+
url: string;
|
|
116
|
+
}
|
|
117
|
+
export interface BetaUserProfileTrustGrant {
|
|
118
|
+
/**
|
|
119
|
+
* Status of the trust grant.
|
|
120
|
+
*/
|
|
121
|
+
status: 'active' | 'pending' | 'rejected';
|
|
122
|
+
}
|
|
123
|
+
export interface UserProfileCreateParams {
|
|
124
|
+
/**
|
|
125
|
+
* Body param: Platform's own identifier for this user. Not enforced unique.
|
|
126
|
+
* Maximum 255 characters.
|
|
127
|
+
*/
|
|
128
|
+
external_id?: string | null;
|
|
129
|
+
/**
|
|
130
|
+
* Body param: Free-form key-value data to attach to this user profile. Maximum 16
|
|
131
|
+
* keys, with keys up to 64 characters and values up to 512 characters. Values must
|
|
132
|
+
* be non-empty strings.
|
|
133
|
+
*/
|
|
134
|
+
metadata?: {
|
|
135
|
+
[key: string]: string;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
139
|
+
*/
|
|
140
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
141
|
+
}
|
|
142
|
+
export interface UserProfileRetrieveParams {
|
|
143
|
+
/**
|
|
144
|
+
* Optional header to specify the beta version(s) you want to use.
|
|
145
|
+
*/
|
|
146
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
147
|
+
}
|
|
148
|
+
export interface UserProfileUpdateParams {
|
|
149
|
+
/**
|
|
150
|
+
* Body param: If present, replaces the stored external_id. Omit to leave
|
|
151
|
+
* unchanged. Maximum 255 characters.
|
|
152
|
+
*/
|
|
153
|
+
external_id?: string | null;
|
|
154
|
+
/**
|
|
155
|
+
* Body param: Key-value pairs to merge into the stored metadata. Keys provided
|
|
156
|
+
* overwrite existing values. To remove a key, set its value to an empty string.
|
|
157
|
+
* Keys not provided are left unchanged. Maximum 16 keys, with keys up to 64
|
|
158
|
+
* characters and values up to 512 characters.
|
|
159
|
+
*/
|
|
160
|
+
metadata?: {
|
|
161
|
+
[key: string]: string;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
165
|
+
*/
|
|
166
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
167
|
+
}
|
|
168
|
+
export interface UserProfileListParams extends PageCursorParams {
|
|
169
|
+
/**
|
|
170
|
+
* Query param: Query parameter for order
|
|
171
|
+
*/
|
|
172
|
+
order?: 'asc' | 'desc';
|
|
173
|
+
/**
|
|
174
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
175
|
+
*/
|
|
176
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
177
|
+
}
|
|
178
|
+
export interface UserProfileCreateEnrollmentURLParams {
|
|
179
|
+
/**
|
|
180
|
+
* Optional header to specify the beta version(s) you want to use.
|
|
181
|
+
*/
|
|
182
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
183
|
+
}
|
|
184
|
+
export declare namespace UserProfiles {
|
|
185
|
+
export { type BetaUserProfile as BetaUserProfile, type BetaUserProfileEnrollmentURL as BetaUserProfileEnrollmentURL, type BetaUserProfileTrustGrant as BetaUserProfileTrustGrant, type BetaUserProfilesPageCursor as BetaUserProfilesPageCursor, type UserProfileCreateParams as UserProfileCreateParams, type UserProfileRetrieveParams as UserProfileRetrieveParams, type UserProfileUpdateParams as UserProfileUpdateParams, type UserProfileListParams as UserProfileListParams, type UserProfileCreateEnrollmentURLParams as UserProfileCreateEnrollmentURLParams, };
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=user-profiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-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,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,oCAAoC;IACnD;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,oCAAoC,IAAI,oCAAoC,GAClF,CAAC;CACH"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.UserProfiles = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../internal/headers.js");
|
|
8
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
9
|
+
class UserProfiles extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create User Profile
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const betaUserProfile =
|
|
16
|
+
* await client.beta.userProfiles.create();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(params, options) {
|
|
20
|
+
const { betas, ...body } = params;
|
|
21
|
+
return this._client.post('/v1/user_profiles?beta=true', {
|
|
22
|
+
body,
|
|
23
|
+
...options,
|
|
24
|
+
headers: (0, headers_1.buildHeaders)([
|
|
25
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
26
|
+
options?.headers,
|
|
27
|
+
]),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Get User Profile
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const betaUserProfile =
|
|
36
|
+
* await client.beta.userProfiles.retrieve(
|
|
37
|
+
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
retrieve(userProfileID, params = {}, options) {
|
|
42
|
+
const { betas } = params ?? {};
|
|
43
|
+
return this._client.get((0, path_1.path) `/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
44
|
+
...options,
|
|
45
|
+
headers: (0, headers_1.buildHeaders)([
|
|
46
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
47
|
+
options?.headers,
|
|
48
|
+
]),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Update User Profile
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const betaUserProfile =
|
|
57
|
+
* await client.beta.userProfiles.update(
|
|
58
|
+
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
|
|
59
|
+
* );
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
update(userProfileID, params, options) {
|
|
63
|
+
const { betas, ...body } = params;
|
|
64
|
+
return this._client.post((0, path_1.path) `/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
65
|
+
body,
|
|
66
|
+
...options,
|
|
67
|
+
headers: (0, headers_1.buildHeaders)([
|
|
68
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
69
|
+
options?.headers,
|
|
70
|
+
]),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* List User Profiles
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* // Automatically fetches more pages as needed.
|
|
79
|
+
* for await (const betaUserProfile of client.beta.userProfiles.list()) {
|
|
80
|
+
* // ...
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
list(params = {}, options) {
|
|
85
|
+
const { betas, ...query } = params ?? {};
|
|
86
|
+
return this._client.getAPIList('/v1/user_profiles?beta=true', (pagination_1.PageCursor), {
|
|
87
|
+
query,
|
|
88
|
+
...options,
|
|
89
|
+
headers: (0, headers_1.buildHeaders)([
|
|
90
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
91
|
+
options?.headers,
|
|
92
|
+
]),
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Create Enrollment URL
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* const betaUserProfileEnrollmentURL =
|
|
101
|
+
* await client.beta.userProfiles.createEnrollmentURL(
|
|
102
|
+
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
|
|
103
|
+
* );
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
createEnrollmentURL(userProfileID, params = {}, options) {
|
|
107
|
+
const { betas } = params ?? {};
|
|
108
|
+
return this._client.post((0, path_1.path) `/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
109
|
+
...options,
|
|
110
|
+
headers: (0, headers_1.buildHeaders)([
|
|
111
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
112
|
+
options?.headers,
|
|
113
|
+
]),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.UserProfiles = UserProfiles;
|
|
118
|
+
//# sourceMappingURL=user-profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-profiles.js","sourceRoot":"","sources":["../../src/resources/beta/user-profiles.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,yDAAuF;AACvF,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;OAQG;IACH,MAAM,CAAC,MAA+B,EAAE,OAAwB;QAC9D,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE;YACtD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,0BAA0B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CACN,aAAqB,EACrB,SAAuD,EAAE,EACzD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,aAAa,YAAY,EAAE;YAC1E,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,0BAA0B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC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;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,0BAA0B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA9HD,oCA8HC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { PageCursor } from "../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
5
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
6
|
+
export class UserProfiles extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create User Profile
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const betaUserProfile =
|
|
13
|
+
* await client.beta.userProfiles.create();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(params, options) {
|
|
17
|
+
const { betas, ...body } = params;
|
|
18
|
+
return this._client.post('/v1/user_profiles?beta=true', {
|
|
19
|
+
body,
|
|
20
|
+
...options,
|
|
21
|
+
headers: buildHeaders([
|
|
22
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
23
|
+
options?.headers,
|
|
24
|
+
]),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get User Profile
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const betaUserProfile =
|
|
33
|
+
* await client.beta.userProfiles.retrieve(
|
|
34
|
+
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
retrieve(userProfileID, params = {}, options) {
|
|
39
|
+
const { betas } = params ?? {};
|
|
40
|
+
return this._client.get(path `/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
41
|
+
...options,
|
|
42
|
+
headers: buildHeaders([
|
|
43
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
44
|
+
options?.headers,
|
|
45
|
+
]),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Update User Profile
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const betaUserProfile =
|
|
54
|
+
* await client.beta.userProfiles.update(
|
|
55
|
+
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
update(userProfileID, params, options) {
|
|
60
|
+
const { betas, ...body } = params;
|
|
61
|
+
return this._client.post(path `/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
62
|
+
body,
|
|
63
|
+
...options,
|
|
64
|
+
headers: buildHeaders([
|
|
65
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
66
|
+
options?.headers,
|
|
67
|
+
]),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* List User Profiles
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* // Automatically fetches more pages as needed.
|
|
76
|
+
* for await (const betaUserProfile of client.beta.userProfiles.list()) {
|
|
77
|
+
* // ...
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
list(params = {}, options) {
|
|
82
|
+
const { betas, ...query } = params ?? {};
|
|
83
|
+
return this._client.getAPIList('/v1/user_profiles?beta=true', (PageCursor), {
|
|
84
|
+
query,
|
|
85
|
+
...options,
|
|
86
|
+
headers: buildHeaders([
|
|
87
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
88
|
+
options?.headers,
|
|
89
|
+
]),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Create Enrollment URL
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* const betaUserProfileEnrollmentURL =
|
|
98
|
+
* await client.beta.userProfiles.createEnrollmentURL(
|
|
99
|
+
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
|
|
100
|
+
* );
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
createEnrollmentURL(userProfileID, params = {}, options) {
|
|
104
|
+
const { betas } = params ?? {};
|
|
105
|
+
return this._client.post(path `/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
106
|
+
...options,
|
|
107
|
+
headers: buildHeaders([
|
|
108
|
+
{ 'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-03-24'].toString() },
|
|
109
|
+
options?.headers,
|
|
110
|
+
]),
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=user-profiles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-profiles.mjs","sourceRoot":"","sources":["../../src/resources/beta/user-profiles.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAClD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;OAQG;IACH,MAAM,CAAC,MAA+B,EAAE,OAAwB;QAC9D,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE;YACtD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY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AAM,IAAI,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,6BAA6B,EAAE,CAAA,UAA2B,CAAA,EAAE;YACzF,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,0BAA0B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,mBAAmB,CACjB,aAAqB,EACrB,SAAkE,EAAE,EACpE,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,aAAa,2BAA2B,EAAE;YAC1F,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,0BAA0B,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -113,36 +113,20 @@ export interface CompletionCreateParamsBase {
|
|
|
113
113
|
*/
|
|
114
114
|
stream?: boolean;
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* for analytical / multiple choice, and closer to `1.0` for creative and
|
|
120
|
-
* generative tasks.
|
|
121
|
-
*
|
|
122
|
-
* Note that even with `temperature` of `0.0`, the results will not be fully
|
|
123
|
-
* deterministic.
|
|
116
|
+
* @deprecated Deprecated. Models released after Claude Opus 4.6 do not support
|
|
117
|
+
* setting temperature. A value of 1.0 of will be accepted for backwards
|
|
118
|
+
* compatibility, all other values will be rejected with a 400 error.
|
|
124
119
|
*/
|
|
125
120
|
temperature?: number;
|
|
126
121
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* Used to remove "long tail" low probability responses.
|
|
130
|
-
* [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
|
|
131
|
-
*
|
|
132
|
-
* Recommended for advanced use cases only. You usually only need to use
|
|
133
|
-
* `temperature`.
|
|
122
|
+
* @deprecated Deprecated. Models released after Claude Opus 4.6 do not accept
|
|
123
|
+
* top_k; any value will be rejected with a 400 error.
|
|
134
124
|
*/
|
|
135
125
|
top_k?: number;
|
|
136
126
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* for each subsequent token in decreasing probability order and cut it off once it
|
|
141
|
-
* reaches a particular probability specified by `top_p`. You should either alter
|
|
142
|
-
* `temperature` or `top_p`, but not both.
|
|
143
|
-
*
|
|
144
|
-
* Recommended for advanced use cases only. You usually only need to use
|
|
145
|
-
* `temperature`.
|
|
127
|
+
* @deprecated Deprecated. Models released after Claude Opus 4.6 do not support
|
|
128
|
+
* setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all
|
|
129
|
+
* other values will be rejected with a 400 error.
|
|
146
130
|
*/
|
|
147
131
|
top_p?: number;
|
|
148
132
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.mts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,MAAM,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;I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H,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;CACtC;AAED,yBAAiB,sBAAsB,CAAC;IACtC;;OAEG;IACH,KAAY,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAE5C,KAAY,kCAAkC,GAAG,cAAc,CAAC,kCAAkC,CAAC;IACnG,KAAY,+BAA+B,GAAG,cAAc,CAAC,+BAA+B,CAAC;CAC9F;AAED,MAAM,WAAW,kCAAmC,SAAQ,0BAA0B;IACpF;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IACjF;;;;;OAKG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -113,36 +113,20 @@ export interface CompletionCreateParamsBase {
|
|
|
113
113
|
*/
|
|
114
114
|
stream?: boolean;
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* for analytical / multiple choice, and closer to `1.0` for creative and
|
|
120
|
-
* generative tasks.
|
|
121
|
-
*
|
|
122
|
-
* Note that even with `temperature` of `0.0`, the results will not be fully
|
|
123
|
-
* deterministic.
|
|
116
|
+
* @deprecated Deprecated. Models released after Claude Opus 4.6 do not support
|
|
117
|
+
* setting temperature. A value of 1.0 of will be accepted for backwards
|
|
118
|
+
* compatibility, all other values will be rejected with a 400 error.
|
|
124
119
|
*/
|
|
125
120
|
temperature?: number;
|
|
126
121
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* Used to remove "long tail" low probability responses.
|
|
130
|
-
* [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
|
|
131
|
-
*
|
|
132
|
-
* Recommended for advanced use cases only. You usually only need to use
|
|
133
|
-
* `temperature`.
|
|
122
|
+
* @deprecated Deprecated. Models released after Claude Opus 4.6 do not accept
|
|
123
|
+
* top_k; any value will be rejected with a 400 error.
|
|
134
124
|
*/
|
|
135
125
|
top_k?: number;
|
|
136
126
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* for each subsequent token in decreasing probability order and cut it off once it
|
|
141
|
-
* reaches a particular probability specified by `top_p`. You should either alter
|
|
142
|
-
* `temperature` or `top_p`, but not both.
|
|
143
|
-
*
|
|
144
|
-
* Recommended for advanced use cases only. You usually only need to use
|
|
145
|
-
* `temperature`.
|
|
127
|
+
* @deprecated Deprecated. Models released after Claude Opus 4.6 do not support
|
|
128
|
+
* setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all
|
|
129
|
+
* other values will be rejected with a 400 error.
|
|
146
130
|
*/
|
|
147
131
|
top_p?: number;
|
|
148
132
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../src/resources/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,MAAM,EAAE,kCAAkC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IACpG,MAAM,CAAC,MAAM,EAAE,+BAA+B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,U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CAAC,CAAC;CACtC;AAED,yBAAiB,sBAAsB,CAAC;IACtC;;OAEG;IACH,KAAY,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAE5C,KAAY,kCAAkC,GAAG,cAAc,CAAC,kCAAkC,CAAC;IACnG,KAAY,+BAA+B,GAAG,cAAc,CAAC,+BAA+B,CAAC;CAC9F;AAED,MAAM,WAAW,kCAAmC,SAAQ,0BAA0B;IACpF;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,+BAAgC,SAAQ,0BAA0B;IACjF;;;;;OAKG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -704,12 +704,12 @@ export interface Metadata {
|
|
|
704
704
|
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
705
705
|
* details and options.
|
|
706
706
|
*/
|
|
707
|
-
export type Model = 'claude-mythos-preview' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-haiku-4-5' | 'claude-haiku-4-5-20251001' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-5' | 'claude-sonnet-4-5-20250929' | 'claude-opus-4-1' | 'claude-opus-4-1-20250805' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-3-haiku-20240307' | (string & {});
|
|
707
|
+
export type Model = 'claude-opus-4-7' | 'claude-mythos-preview' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-haiku-4-5' | 'claude-haiku-4-5-20251001' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-5' | 'claude-sonnet-4-5-20250929' | 'claude-opus-4-1' | 'claude-opus-4-1-20250805' | 'claude-opus-4-0' | 'claude-opus-4-20250514' | 'claude-sonnet-4-0' | 'claude-sonnet-4-20250514' | 'claude-3-haiku-20240307' | (string & {});
|
|
708
708
|
export interface OutputConfig {
|
|
709
709
|
/**
|
|
710
710
|
* All possible effort levels.
|
|
711
711
|
*/
|
|
712
|
-
effort?: 'low' | 'medium' | 'high' | 'max' | null;
|
|
712
|
+
effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
|
|
713
713
|
/**
|
|
714
714
|
* A schema to specify Claude's output format in responses. See
|
|
715
715
|
* [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
|