Skip to content

Commit b614636

Browse files
feat: Allow arbitrary viewport dimensions
1 parent 7279ce9 commit b614636

15 files changed

+124
-122
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 100
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-b7d469021adcd1493f74dad38746ffa3817dcf86a0a12561a88eb554824e3ffb.yml
3-
openapi_spec_hash: 4134c95bf3012dca38797ca56d62395b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-47ee6a2b624baddb41a681feff758bf1893cd3d65edf3ab51219ebe4d942932b.yml
3+
openapi_spec_hash: 76178c41ede593e76bfacb176057d2f0
44
config_hash: 27c0ea01aeb797a1767af139851c5b66

src/kernel/resources/browser_pools.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ def create(
108108
are destroyed. Defaults to 600 seconds if not specified
109109
110110
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
111-
image defaults apply (1920x1080@25). Only specific viewport configurations are
112-
supported. The server will reject unsupported combinations. Supported
113-
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
114-
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
115-
be automatically determined from the width and height if they match a supported
116-
configuration exactly. Note: Higher resolutions may affect the responsiveness of
117-
live view browser
111+
image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
112+
but the following configurations are known-good and fully tested: 2560x1440@10,
113+
1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
114+
Viewports outside this list may exhibit unstable live view or recording
115+
behavior. If refresh_rate is not provided, it will be automatically determined
116+
based on the resolution (higher resolutions use lower refresh rates to keep
117+
bandwidth reasonable).
118118
119119
extra_headers: Send extra headers
120120
@@ -240,13 +240,13 @@ def update(
240240
are destroyed. Defaults to 600 seconds if not specified
241241
242242
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
243-
image defaults apply (1920x1080@25). Only specific viewport configurations are
244-
supported. The server will reject unsupported combinations. Supported
245-
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
246-
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
247-
be automatically determined from the width and height if they match a supported
248-
configuration exactly. Note: Higher resolutions may affect the responsiveness of
249-
live view browser
243+
image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
244+
but the following configurations are known-good and fully tested: 2560x1440@10,
245+
1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
246+
Viewports outside this list may exhibit unstable live view or recording
247+
behavior. If refresh_rate is not provided, it will be automatically determined
248+
based on the resolution (higher resolutions use lower refresh rates to keep
249+
bandwidth reasonable).
250250
251251
extra_headers: Send extra headers
252252
@@ -546,13 +546,13 @@ async def create(
546546
are destroyed. Defaults to 600 seconds if not specified
547547
548548
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
549-
image defaults apply (1920x1080@25). Only specific viewport configurations are
550-
supported. The server will reject unsupported combinations. Supported
551-
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
552-
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
553-
be automatically determined from the width and height if they match a supported
554-
configuration exactly. Note: Higher resolutions may affect the responsiveness of
555-
live view browser
549+
image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
550+
but the following configurations are known-good and fully tested: 2560x1440@10,
551+
1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
552+
Viewports outside this list may exhibit unstable live view or recording
553+
behavior. If refresh_rate is not provided, it will be automatically determined
554+
based on the resolution (higher resolutions use lower refresh rates to keep
555+
bandwidth reasonable).
556556
557557
extra_headers: Send extra headers
558558
@@ -678,13 +678,13 @@ async def update(
678678
are destroyed. Defaults to 600 seconds if not specified
679679
680680
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
681-
image defaults apply (1920x1080@25). Only specific viewport configurations are
682-
supported. The server will reject unsupported combinations. Supported
683-
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
684-
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
685-
be automatically determined from the width and height if they match a supported
686-
configuration exactly. Note: Higher resolutions may affect the responsiveness of
687-
live view browser
681+
image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
682+
but the following configurations are known-good and fully tested: 2560x1440@10,
683+
1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
684+
Viewports outside this list may exhibit unstable live view or recording
685+
behavior. If refresh_rate is not provided, it will be automatically determined
686+
based on the resolution (higher resolutions use lower refresh rates to keep
687+
bandwidth reasonable).
688688
689689
extra_headers: Send extra headers
690690

src/kernel/resources/browsers/browsers.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ def create(
185185
see is +/- 5 seconds around the specified value.
186186
187187
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
188-
image defaults apply (1920x1080@25). Only specific viewport configurations are
189-
supported. The server will reject unsupported combinations. Supported
190-
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
191-
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
192-
be automatically determined from the width and height if they match a supported
193-
configuration exactly. Note: Higher resolutions may affect the responsiveness of
194-
live view browser
188+
image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
189+
but the following configurations are known-good and fully tested: 2560x1440@10,
190+
1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
191+
Viewports outside this list may exhibit unstable live view or recording
192+
behavior. If refresh_rate is not provided, it will be automatically determined
193+
based on the resolution (higher resolutions use lower refresh rates to keep
194+
bandwidth reasonable).
195195
196196
extra_headers: Send extra headers
197197
@@ -596,13 +596,13 @@ async def create(
596596
see is +/- 5 seconds around the specified value.
597597
598598
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
599-
image defaults apply (1920x1080@25). Only specific viewport configurations are
600-
supported. The server will reject unsupported combinations. Supported
601-
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
602-
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
603-
be automatically determined from the width and height if they match a supported
604-
configuration exactly. Note: Higher resolutions may affect the responsiveness of
605-
live view browser
599+
image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
600+
but the following configurations are known-good and fully tested: 2560x1440@10,
601+
1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
602+
Viewports outside this list may exhibit unstable live view or recording
603+
behavior. If refresh_rate is not provided, it will be automatically determined
604+
based on the resolution (higher resolutions use lower refresh rates to keep
605+
bandwidth reasonable).
606606
607607
extra_headers: Send extra headers
608608

src/kernel/types/browser_create_params.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ class BrowserCreateParams(TypedDict, total=False):
6969
viewport: BrowserViewport
7070
"""Initial browser window size in pixels with optional refresh rate.
7171
72-
If omitted, image defaults apply (1920x1080@25). Only specific viewport
73-
configurations are supported. The server will reject unsupported combinations.
74-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
75-
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
76-
provided, it will be automatically determined from the width and height if they
77-
match a supported configuration exactly. Note: Higher resolutions may affect the
78-
responsiveness of live view browser
72+
If omitted, image defaults apply (1920x1080@25). Arbitrary viewport dimensions
73+
are accepted, but the following configurations are known-good and fully tested:
74+
2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60,
75+
1200x800@60. Viewports outside this list may exhibit unstable live view or
76+
recording behavior. If refresh_rate is not provided, it will be automatically
77+
determined based on the resolution (higher resolutions use lower refresh rates
78+
to keep bandwidth reasonable).
7979
"""

src/kernel/types/browser_create_response.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ class BrowserCreateResponse(BaseModel):
5454
viewport: Optional[BrowserViewport] = None
5555
"""Initial browser window size in pixels with optional refresh rate.
5656
57-
If omitted, image defaults apply (1920x1080@25). Only specific viewport
58-
configurations are supported. The server will reject unsupported combinations.
59-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
60-
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
61-
provided, it will be automatically determined from the width and height if they
62-
match a supported configuration exactly. Note: Higher resolutions may affect the
63-
responsiveness of live view browser
57+
If omitted, image defaults apply (1920x1080@25). Arbitrary viewport dimensions
58+
are accepted, but the following configurations are known-good and fully tested:
59+
2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60,
60+
1200x800@60. Viewports outside this list may exhibit unstable live view or
61+
recording behavior. If refresh_rate is not provided, it will be automatically
62+
determined based on the resolution (higher resolutions use lower refresh rates
63+
to keep bandwidth reasonable).
6464
"""

src/kernel/types/browser_list_response.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ class BrowserListResponse(BaseModel):
5454
viewport: Optional[BrowserViewport] = None
5555
"""Initial browser window size in pixels with optional refresh rate.
5656
57-
If omitted, image defaults apply (1920x1080@25). Only specific viewport
58-
configurations are supported. The server will reject unsupported combinations.
59-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
60-
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
61-
provided, it will be automatically determined from the width and height if they
62-
match a supported configuration exactly. Note: Higher resolutions may affect the
63-
responsiveness of live view browser
57+
If omitted, image defaults apply (1920x1080@25). Arbitrary viewport dimensions
58+
are accepted, but the following configurations are known-good and fully tested:
59+
2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60,
60+
1200x800@60. Viewports outside this list may exhibit unstable live view or
61+
recording behavior. If refresh_rate is not provided, it will be automatically
62+
determined based on the resolution (higher resolutions use lower refresh rates
63+
to keep bandwidth reasonable).
6464
"""

src/kernel/types/browser_pool.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ class BrowserPoolConfig(BaseModel):
7070
viewport: Optional[BrowserViewport] = None
7171
"""Initial browser window size in pixels with optional refresh rate.
7272
73-
If omitted, image defaults apply (1920x1080@25). Only specific viewport
74-
configurations are supported. The server will reject unsupported combinations.
75-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
76-
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
77-
provided, it will be automatically determined from the width and height if they
78-
match a supported configuration exactly. Note: Higher resolutions may affect the
79-
responsiveness of live view browser
73+
If omitted, image defaults apply (1920x1080@25). Arbitrary viewport dimensions
74+
are accepted, but the following configurations are known-good and fully tested:
75+
2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60,
76+
1200x800@60. Viewports outside this list may exhibit unstable live view or
77+
recording behavior. If refresh_rate is not provided, it will be automatically
78+
determined based on the resolution (higher resolutions use lower refresh rates
79+
to keep bandwidth reasonable).
8080
"""
8181

8282

src/kernel/types/browser_pool_acquire_response.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ class BrowserPoolAcquireResponse(BaseModel):
5454
viewport: Optional[BrowserViewport] = None
5555
"""Initial browser window size in pixels with optional refresh rate.
5656
57-
If omitted, image defaults apply (1920x1080@25). Only specific viewport
58-
configurations are supported. The server will reject unsupported combinations.
59-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
60-
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
61-
provided, it will be automatically determined from the width and height if they
62-
match a supported configuration exactly. Note: Higher resolutions may affect the
63-
responsiveness of live view browser
57+
If omitted, image defaults apply (1920x1080@25). Arbitrary viewport dimensions
58+
are accepted, but the following configurations are known-good and fully tested:
59+
2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60,
60+
1200x800@60. Viewports outside this list may exhibit unstable live view or
61+
recording behavior. If refresh_rate is not provided, it will be automatically
62+
determined based on the resolution (higher resolutions use lower refresh rates
63+
to keep bandwidth reasonable).
6464
"""

src/kernel/types/browser_pool_create_params.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ class BrowserPoolCreateParams(TypedDict, total=False):
6969
viewport: BrowserViewport
7070
"""Initial browser window size in pixels with optional refresh rate.
7171
72-
If omitted, image defaults apply (1920x1080@25). Only specific viewport
73-
configurations are supported. The server will reject unsupported combinations.
74-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
75-
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
76-
provided, it will be automatically determined from the width and height if they
77-
match a supported configuration exactly. Note: Higher resolutions may affect the
78-
responsiveness of live view browser
72+
If omitted, image defaults apply (1920x1080@25). Arbitrary viewport dimensions
73+
are accepted, but the following configurations are known-good and fully tested:
74+
2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60,
75+
1200x800@60. Viewports outside this list may exhibit unstable live view or
76+
recording behavior. If refresh_rate is not provided, it will be automatically
77+
determined based on the resolution (higher resolutions use lower refresh rates
78+
to keep bandwidth reasonable).
7979
"""

src/kernel/types/browser_pool_update_params.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ class BrowserPoolUpdateParams(TypedDict, total=False):
7575
viewport: BrowserViewport
7676
"""Initial browser window size in pixels with optional refresh rate.
7777
78-
If omitted, image defaults apply (1920x1080@25). Only specific viewport
79-
configurations are supported. The server will reject unsupported combinations.
80-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
81-
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
82-
provided, it will be automatically determined from the width and height if they
83-
match a supported configuration exactly. Note: Higher resolutions may affect the
84-
responsiveness of live view browser
78+
If omitted, image defaults apply (1920x1080@25). Arbitrary viewport dimensions
79+
are accepted, but the following configurations are known-good and fully tested:
80+
2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60,
81+
1200x800@60. Viewports outside this list may exhibit unstable live view or
82+
recording behavior. If refresh_rate is not provided, it will be automatically
83+
determined based on the resolution (higher resolutions use lower refresh rates
84+
to keep bandwidth reasonable).
8585
"""

0 commit comments

Comments
 (0)