Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Fixed structured output issue with simple judge
Saurav Panda07817c2c5b14
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex ceaa70429..12ee404c2 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -1514,7 +1514,13 @@ class Agent(Generic[Context, AgentStructuredOutput]):self.logger.info(f'⚠️ Simple judge overriding success to failure: {reason}')last_result.success = Falsenote = f'[Simple judge: {reason}]'- if last_result.extracted_content:+ # When structured output is expected, don't append judge text to extracted_content+ # as it would corrupt the JSON and break end-user parsers+ if self.output_model_schema is not None:+ if last_result.metadata is None:+ last_result.metadata = {}+ last_result.metadata['simple_judge'] = note+ elif last_result.extracted_content:last_result.extracted_content += f'\n\n{note}'else:last_result.extracted_content = note