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
in flash mode disable planning
Saurav Panda023367052cd9
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 01caacfff..3e2ffdb6d 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -228,6 +228,10 @@ class Agent(Generic[Context, AgentStructuredOutput]):if llm.provider == 'browser-use':flash_mode = True+ # Flash mode strips plan fields from the output schema, so planning is structurally impossible+ if flash_mode:+ enable_planning = False+# Auto-configure llm_screenshot_size for Claude Sonnet modelsif llm_screenshot_size is None:model_name = getattr(llm, 'model', '')diff --git a/tests/ci/test_agent_planning.py b/tests/ci/test_agent_planning.pyindex fd911846e..ad840c44c 100644--- a/tests/ci/test_agent_planning.py+++ b/tests/ci/test_agent_planning.py@@ -375,3 +375,13 @@ async def test_exploration_nudge_disabled_when_planning_off(browser_session, mocagent._inject_exploration_nudge()after_count = len(agent._message_manager.state.history.context_messages)assert after_count == initial_count+++# ---------------------------------------------------------------------------+# 19. Flash mode forces enable_planning=False+# ---------------------------------------------------------------------------+++async def test_flash_mode_disables_planning(browser_session, mock_llm):+ agent = _make_agent(browser_session, mock_llm, flash_mode=True)+ assert agent.settings.enable_planning is False