Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix config setup

Nick Sweeting1ff5983a8888
diff --git a/browser_use/browser/context.py b/browser_use/browser/context.py
index 7cbb3c3a0..23e85abf2 100644
--- a/browser_use/browser/context.py
+++ b/browser_use/browser/context.py
@@ -122,7 +122,14 @@ class BrowserContextConfig(BaseModel):
Changes the timezone of the browser. Example: 'Europe/Berlin'
"""
- model_config = ConfigDict(arbitrary_types_allowed=True, extra='ignore')
+ model_config = ConfigDict(
+ arbitrary_types_allowed=True,
+ extra='ignore',
+ populate_by_name=True,
+ from_attributes=True,
+ validate_assignment=True,
+ revalidate_instances='subclass-instances',
+ )
cookies_file: str | None = None
minimum_wait_page_load_time: float = 0.25