Skip to content

Commit 9ff1b44

Browse files
feat: Expose plan-derived auth limits on GET /org/limits
Stainless-Generated-From: f793e2f1d478198a0f75f553437b8b554b75368f
1 parent 6cddf2b commit 9ff1b44

2 files changed

Lines changed: 23 additions & 10 deletions

File tree

src/kernel/resources/organization/limits.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ def retrieve(
5555
extra_body: Body | None = None,
5656
timeout: float | httpx.Timeout | None | NotGiven = not_given,
5757
) -> OrgLimits:
58-
"""
59-
Get the organization's concurrency limit — the maximum browsers running at once
60-
across on-demand sessions and browser pool reservations — and the default
61-
per-project concurrency cap applied to projects without an explicit override.
62-
"""
58+
"""Get the organization's effective limits and managed auth usage."""
6359
return self._get(
6460
"/org/limits",
6561
options=make_request_options(
@@ -142,11 +138,7 @@ async def retrieve(
142138
extra_body: Body | None = None,
143139
timeout: float | httpx.Timeout | None | NotGiven = not_given,
144140
) -> OrgLimits:
145-
"""
146-
Get the organization's concurrency limit — the maximum browsers running at once
147-
across on-demand sessions and browser pool reservations — and the default
148-
per-project concurrency cap applied to projects without an explicit override.
149-
"""
141+
"""Get the organization's effective limits and managed auth usage."""
150142
return await self._get(
151143
"/org/limits",
152144
options=make_request_options(

src/kernel/types/organization/org_limits.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88

99

1010
class OrgLimits(BaseModel):
11+
auth_connections_used: int
12+
"""
13+
The organization's current non-deleted managed auth connections, counted
14+
org-wide across every project. Compare against max_auth_connections to show
15+
remaining capacity before a create is rejected with 403 insufficient_plan.
16+
"""
17+
18+
max_auth_connections: Optional[int] = None
19+
"""Maximum managed auth connections the organization's plan allows.
20+
21+
Null means unlimited. Counted org-wide, so it cannot be multiplied across
22+
projects.
23+
"""
24+
25+
min_health_check_interval_seconds: int
26+
"""
27+
Smallest health_check_interval the organization's plan accepts on a managed auth
28+
connection. Requests below this are rejected with 400. Existing connections
29+
stored below the floor are grandfathered until edited.
30+
"""
31+
1132
default_project_max_concurrent_sessions: Optional[int] = None
1233
"""
1334
Default maximum concurrent browsers applied to every project that has no

0 commit comments

Comments
 (0)