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
fix confusing error message
paul2048b07d0dc431b8
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 90510c54f..e53050c65 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -1241,8 +1241,9 @@ class Agent(Generic[Context]):raise Exception('LLM responded to a simple test question incorrectly')except Exception as e:self.llm._verified_api_keys = False+ keys_msg = f' Check that {", ".join(required_keys)} is set correctly in .env and has sufficient funding.' if required_keys else ''logger.error(- f'\n\n❌ LLM {self.llm.__class__.__name__} connection test failed. Check that {", ".join(required_keys)} is set correctly in .env and that the LLM API account has sufficient funding.\n\n{e}\n'+ f'❌ LLM {self.llm.__class__.__name__} connection test failed.{keys_msg}\n\n{e}')return False