116116from ...types .browser_network_config_param import BrowserNetworkConfigParam
117117from ...types .browser_network_update_param import BrowserNetworkUpdateParam
118118from ...types .shared_params .browser_profile import BrowserProfile
119+ from ...types .browser_location_request_param import BrowserLocationRequestParam
119120from ...types .shared_params .browser_viewport import BrowserViewport
120121from ...types .shared_params .browser_extension import BrowserExtension
122+ from ...types .browser_location_update_request_param import BrowserLocationUpdateRequestParam
121123
122124__all__ = ["BrowsersResource" , "AsyncBrowsersResource" ]
123125
@@ -195,6 +197,7 @@ def create(
195197 headless : bool | Omit = omit ,
196198 invocation_id : str | Omit = omit ,
197199 kiosk_mode : bool | Omit = omit ,
200+ location : BrowserLocationRequestParam | Omit = omit ,
198201 memory : BrowserMemoryRequest | Omit = omit ,
199202 name : str | Omit = omit ,
200203 network : BrowserNetworkConfigParam | Omit = omit ,
@@ -239,6 +242,9 @@ def create(
239242 kiosk_mode: If true, launches the browser in kiosk mode to hide address bar and tabs in live
240243 view.
241244
245+ location: Optional session-only timezone and locale overrides. Each omitted field uses the
246+ default for the browser's region. start_url opens once the location applies.
247+
242248 memory:
243249 Memory for a non-GPU browser. Headless: 1GiB (default), 2GiB, or 4GiB. Headful:
244250 8GiB (default) or 16GiB.
@@ -333,6 +339,7 @@ def create(
333339 "headless" : headless ,
334340 "invocation_id" : invocation_id ,
335341 "kiosk_mode" : kiosk_mode ,
342+ "location" : location ,
336343 "memory" : memory ,
337344 "name" : name ,
338345 "network" : network ,
@@ -404,6 +411,7 @@ def update(
404411 id_or_name : str ,
405412 * ,
406413 disable_default_proxy : bool | Omit = omit ,
414+ location : BrowserLocationUpdateRequestParam | Omit = omit ,
407415 name : Optional [str ] | Omit = omit ,
408416 network : BrowserNetworkUpdateParam | Omit = omit ,
409417 profile : BrowserProfile | Omit = omit ,
@@ -427,6 +435,14 @@ def update(
427435 disable_default_proxy: If true, stealth browsers connect directly instead of using the default stealth
428436 proxy. Deprecated in favor of proxy.mode.
429437
438+ location: Session-only timezone and locale overrides. Omit the object or a field to leave
439+ it unchanged; set a string to override; set null to clear that field and use the
440+ browser region's default. A browser that cannot change location refuses the
441+ request before anything changes. The location applies after the request's other
442+ changes, and start_url opens once it has applied. If applying it fails, the
443+ other changes and the saved override remain and start_url does not open; retry
444+ the request to apply both.
445+
430446 name: Human-readable name for the browser session. Omit to leave unchanged, set to an
431447 empty string to clear the name. When set, must be unique among active sessions
432448 within the project.
@@ -478,6 +494,7 @@ def update(
478494 body = maybe_transform (
479495 {
480496 "disable_default_proxy" : disable_default_proxy ,
497+ "location" : location ,
481498 "name" : name ,
482499 "network" : network ,
483500 "profile" : profile ,
@@ -912,6 +929,7 @@ async def create(
912929 headless : bool | Omit = omit ,
913930 invocation_id : str | Omit = omit ,
914931 kiosk_mode : bool | Omit = omit ,
932+ location : BrowserLocationRequestParam | Omit = omit ,
915933 memory : BrowserMemoryRequest | Omit = omit ,
916934 name : str | Omit = omit ,
917935 network : BrowserNetworkConfigParam | Omit = omit ,
@@ -956,6 +974,9 @@ async def create(
956974 kiosk_mode: If true, launches the browser in kiosk mode to hide address bar and tabs in live
957975 view.
958976
977+ location: Optional session-only timezone and locale overrides. Each omitted field uses the
978+ default for the browser's region. start_url opens once the location applies.
979+
959980 memory:
960981 Memory for a non-GPU browser. Headless: 1GiB (default), 2GiB, or 4GiB. Headful:
961982 8GiB (default) or 16GiB.
@@ -1050,6 +1071,7 @@ async def create(
10501071 "headless" : headless ,
10511072 "invocation_id" : invocation_id ,
10521073 "kiosk_mode" : kiosk_mode ,
1074+ "location" : location ,
10531075 "memory" : memory ,
10541076 "name" : name ,
10551077 "network" : network ,
@@ -1121,6 +1143,7 @@ async def update(
11211143 id_or_name : str ,
11221144 * ,
11231145 disable_default_proxy : bool | Omit = omit ,
1146+ location : BrowserLocationUpdateRequestParam | Omit = omit ,
11241147 name : Optional [str ] | Omit = omit ,
11251148 network : BrowserNetworkUpdateParam | Omit = omit ,
11261149 profile : BrowserProfile | Omit = omit ,
@@ -1144,6 +1167,14 @@ async def update(
11441167 disable_default_proxy: If true, stealth browsers connect directly instead of using the default stealth
11451168 proxy. Deprecated in favor of proxy.mode.
11461169
1170+ location: Session-only timezone and locale overrides. Omit the object or a field to leave
1171+ it unchanged; set a string to override; set null to clear that field and use the
1172+ browser region's default. A browser that cannot change location refuses the
1173+ request before anything changes. The location applies after the request's other
1174+ changes, and start_url opens once it has applied. If applying it fails, the
1175+ other changes and the saved override remain and start_url does not open; retry
1176+ the request to apply both.
1177+
11471178 name: Human-readable name for the browser session. Omit to leave unchanged, set to an
11481179 empty string to clear the name. When set, must be unique among active sessions
11491180 within the project.
@@ -1195,6 +1226,7 @@ async def update(
11951226 body = await async_maybe_transform (
11961227 {
11971228 "disable_default_proxy" : disable_default_proxy ,
1229+ "location" : location ,
11981230 "name" : name ,
11991231 "network" : network ,
12001232 "profile" : profile ,
0 commit comments