Skip to content

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

Fix regression.

AI Christiansond729720ce24c
diff --git a/browser_use/llm/schema.py b/browser_use/llm/schema.py
index 3a22285db..22e54b2b9 100644
--- a/browser_use/llm/schema.py
+++ b/browser_use/llm/schema.py
@@ -152,10 +152,9 @@ class SchemaOptimizer:
# Then update required for this level
if 'properties' in schema and 'type' in schema and schema['type'] == 'object':
- # Add all properties to required array if 'required' is not already defined
- if 'required' not in schema:
- all_props = list(schema['properties'].keys())
- schema['required'] = all_props # Set all properties as required
+ # Add all properties to required array
+ all_props = list(schema['properties'].keys())
+ schema['required'] = all_props # Set all properties as required
elif isinstance(schema, list):
for item in schema: