Skip to content

Commit dc0c792

Browse files
feat(api): add claude-opus-4-7, token budgets and user_profiles
1 parent 71eff1f commit dc0c792

32 files changed

Lines changed: 1553 additions & 7 deletions

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 72
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-f4d4f18820ecfbe244fb1bbc2232939afca73dfcb21ce23bc296571ee7320e3a.yml
3-
openapi_spec_hash: d849fdf2c4dd6631a60c4340e9bc1322
4-
config_hash: 2e9a2fd5355db62857f6be16f46a3ccc
1+
configured_endpoints: 77
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-e0696f59ae07dc1a9c5a8fc87a4eb05eb35afabaac0b5ff0ea38810fa9dd4a74.yml
3+
openapi_spec_hash: 69278ebbb0d1aa0b322bbbd5128bcec5
4+
config_hash: b0dbd234c2752507397c139a416f6cba

api.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ from anthropic.types.beta import (
444444
BetaThinkingConfigParam,
445445
BetaThinkingDelta,
446446
BetaThinkingTurns,
447+
BetaTokenTaskBudget,
447448
BetaTool,
448449
BetaToolBash20241022,
449450
BetaToolBash20250124,
@@ -842,3 +843,23 @@ Methods:
842843
- <code title="get /v1/skills/{skill_id}/versions/{version}?beta=true">client.beta.skills.versions.<a href="./src/anthropic/resources/beta/skills/versions.py">retrieve</a>(version, \*, skill_id) -> <a href="./src/anthropic/types/beta/skills/version_retrieve_response.py">VersionRetrieveResponse</a></code>
843844
- <code title="get /v1/skills/{skill_id}/versions?beta=true">client.beta.skills.versions.<a href="./src/anthropic/resources/beta/skills/versions.py">list</a>(skill_id, \*\*<a href="src/anthropic/types/beta/skills/version_list_params.py">params</a>) -> <a href="./src/anthropic/types/beta/skills/version_list_response.py">SyncPageCursor[VersionListResponse]</a></code>
844845
- <code title="delete /v1/skills/{skill_id}/versions/{version}?beta=true">client.beta.skills.versions.<a href="./src/anthropic/resources/beta/skills/versions.py">delete</a>(version, \*, skill_id) -> <a href="./src/anthropic/types/beta/skills/version_delete_response.py">VersionDeleteResponse</a></code>
846+
847+
## UserProfiles
848+
849+
Types:
850+
851+
```python
852+
from anthropic.types.beta import (
853+
BetaUserProfile,
854+
BetaUserProfileEnrollmentURL,
855+
BetaUserProfileTrustGrant,
856+
)
857+
```
858+
859+
Methods:
860+
861+
- <code title="post /v1/user_profiles?beta=true">client.beta.user_profiles.<a href="./src/anthropic/resources/beta/user_profiles.py">create</a>(\*\*<a href="src/anthropic/types/beta/user_profile_create_params.py">params</a>) -> <a href="./src/anthropic/types/beta/beta_user_profile.py">BetaUserProfile</a></code>
862+
- <code title="get /v1/user_profiles/{user_profile_id}?beta=true">client.beta.user_profiles.<a href="./src/anthropic/resources/beta/user_profiles.py">retrieve</a>(user_profile_id) -> <a href="./src/anthropic/types/beta/beta_user_profile.py">BetaUserProfile</a></code>
863+
- <code title="post /v1/user_profiles/{user_profile_id}?beta=true">client.beta.user_profiles.<a href="./src/anthropic/resources/beta/user_profiles.py">update</a>(user_profile_id, \*\*<a href="src/anthropic/types/beta/user_profile_update_params.py">params</a>) -> <a href="./src/anthropic/types/beta/beta_user_profile.py">BetaUserProfile</a></code>
864+
- <code title="get /v1/user_profiles?beta=true">client.beta.user_profiles.<a href="./src/anthropic/resources/beta/user_profiles.py">list</a>(\*\*<a href="src/anthropic/types/beta/user_profile_list_params.py">params</a>) -> <a href="./src/anthropic/types/beta/beta_user_profile.py">SyncPageCursor[BetaUserProfile]</a></code>
865+
- <code title="post /v1/user_profiles/{user_profile_id}/enrollment_url?beta=true">client.beta.user_profiles.<a href="./src/anthropic/resources/beta/user_profiles.py">create_enrollment_url</a>(user_profile_id) -> <a href="./src/anthropic/types/beta/beta_user_profile_enrollment_url.py">BetaUserProfileEnrollmentURL</a></code>

src/anthropic/resources/beta/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@
7272
EnvironmentsWithStreamingResponse,
7373
AsyncEnvironmentsWithStreamingResponse,
7474
)
75+
from .user_profiles import (
76+
UserProfiles,
77+
AsyncUserProfiles,
78+
UserProfilesWithRawResponse,
79+
AsyncUserProfilesWithRawResponse,
80+
UserProfilesWithStreamingResponse,
81+
AsyncUserProfilesWithStreamingResponse,
82+
)
7583

7684
__all__ = [
7785
"Models",
@@ -122,6 +130,12 @@
122130
"AsyncSkillsWithRawResponse",
123131
"SkillsWithStreamingResponse",
124132
"AsyncSkillsWithStreamingResponse",
133+
"UserProfiles",
134+
"AsyncUserProfiles",
135+
"UserProfilesWithRawResponse",
136+
"AsyncUserProfilesWithRawResponse",
137+
"UserProfilesWithStreamingResponse",
138+
"AsyncUserProfilesWithStreamingResponse",
125139
"Beta",
126140
"AsyncBeta",
127141
"BetaWithRawResponse",

src/anthropic/resources/beta/beta.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@
4444
SkillsWithStreamingResponse,
4545
AsyncSkillsWithStreamingResponse,
4646
)
47+
from .user_profiles import (
48+
UserProfiles,
49+
AsyncUserProfiles,
50+
UserProfilesWithRawResponse,
51+
AsyncUserProfilesWithRawResponse,
52+
UserProfilesWithStreamingResponse,
53+
AsyncUserProfilesWithStreamingResponse,
54+
)
4755
from .vaults.vaults import (
4856
Vaults,
4957
AsyncVaults,
@@ -105,6 +113,10 @@ def files(self) -> Files:
105113
def skills(self) -> Skills:
106114
return Skills(self._client)
107115

116+
@cached_property
117+
def user_profiles(self) -> UserProfiles:
118+
return UserProfiles(self._client)
119+
108120
@cached_property
109121
def with_raw_response(self) -> BetaWithRawResponse:
110122
"""
@@ -158,6 +170,10 @@ def files(self) -> AsyncFiles:
158170
def skills(self) -> AsyncSkills:
159171
return AsyncSkills(self._client)
160172

173+
@cached_property
174+
def user_profiles(self) -> AsyncUserProfiles:
175+
return AsyncUserProfiles(self._client)
176+
161177
@cached_property
162178
def with_raw_response(self) -> AsyncBetaWithRawResponse:
163179
"""
@@ -214,6 +230,10 @@ def files(self) -> FilesWithRawResponse:
214230
def skills(self) -> SkillsWithRawResponse:
215231
return SkillsWithRawResponse(self._beta.skills)
216232

233+
@cached_property
234+
def user_profiles(self) -> UserProfilesWithRawResponse:
235+
return UserProfilesWithRawResponse(self._beta.user_profiles)
236+
217237

218238
class AsyncBetaWithRawResponse:
219239
def __init__(self, beta: AsyncBeta) -> None:
@@ -251,6 +271,10 @@ def files(self) -> AsyncFilesWithRawResponse:
251271
def skills(self) -> AsyncSkillsWithRawResponse:
252272
return AsyncSkillsWithRawResponse(self._beta.skills)
253273

274+
@cached_property
275+
def user_profiles(self) -> AsyncUserProfilesWithRawResponse:
276+
return AsyncUserProfilesWithRawResponse(self._beta.user_profiles)
277+
254278

255279
class BetaWithStreamingResponse:
256280
def __init__(self, beta: Beta) -> None:
@@ -288,6 +312,10 @@ def files(self) -> FilesWithStreamingResponse:
288312
def skills(self) -> SkillsWithStreamingResponse:
289313
return SkillsWithStreamingResponse(self._beta.skills)
290314

315+
@cached_property
316+
def user_profiles(self) -> UserProfilesWithStreamingResponse:
317+
return UserProfilesWithStreamingResponse(self._beta.user_profiles)
318+
291319

292320
class AsyncBetaWithStreamingResponse:
293321
def __init__(self, beta: AsyncBeta) -> None:
@@ -324,3 +352,7 @@ def files(self) -> AsyncFilesWithStreamingResponse:
324352
@cached_property
325353
def skills(self) -> AsyncSkillsWithStreamingResponse:
326354
return AsyncSkillsWithStreamingResponse(self._beta.skills)
355+
356+
@cached_property
357+
def user_profiles(self) -> AsyncUserProfilesWithStreamingResponse:
358+
return AsyncUserProfilesWithStreamingResponse(self._beta.user_profiles)

0 commit comments

Comments
 (0)