Skip to content

Commit 8b22180

Browse files
feat: Expose organization-wide concurrent browser capacity
Stainless-Generated-From: 3cbbdadb5bad3b3d3192976206eaf515db7a1263
1 parent 460ae50 commit 8b22180

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

‎src/kernel/resources/organization/limits.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ def retrieve(
5555
extra_body: Body | None = None,
5656
timeout: float | httpx.Timeout | None | NotGiven = not_given,
5757
) -> OrgLimits:
58-
"""Get the organization's effective limits and managed auth and vault usage."""
58+
"""
59+
Get the organization's effective limits and current concurrency, managed auth,
60+
and vault usage.
61+
"""
5962
return self._get(
6063
"/org/limits",
6164
options=make_request_options(
@@ -138,7 +141,10 @@ async def retrieve(
138141
extra_body: Body | None = None,
139142
timeout: float | httpx.Timeout | None | NotGiven = not_given,
140143
) -> OrgLimits:
141-
"""Get the organization's effective limits and managed auth and vault usage."""
144+
"""
145+
Get the organization's effective limits and current concurrency, managed auth,
146+
and vault usage.
147+
"""
142148
return await self._get(
143149
"/org/limits",
144150
options=make_request_options(

‎src/kernel/types/organization/org_limits.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ class OrgLimits(BaseModel):
1515
remaining capacity before a create is rejected with 403 insufficient_plan.
1616
"""
1717

18+
concurrent_sessions_available: Optional[int] = None
19+
"""Number of concurrent browser slots currently available to the organization.
20+
21+
This is the effective concurrency limit minus active on-demand sessions and
22+
browser pool reservations, floored at zero. Null when usage cannot be read.
23+
"""
24+
25+
concurrent_sessions_used: Optional[int] = None
26+
"""
27+
Current organization-wide concurrent browser usage, including active on-demand
28+
sessions and browser pool reservations. Null when usage cannot be read.
29+
"""
30+
1831
max_auth_connections: Optional[int] = None
1932
"""Maximum managed auth connections the organization's plan allows.
2033

0 commit comments

Comments
 (0)