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 XAI vision check to only disable for grok-3 and grok-code models
bbarwikcba65772f88f
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex f3a0be233..95d468ca4 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -427,9 +427,11 @@ class Agent(Generic[Context, AgentStructuredOutput]):self.logger.warning('⚠️ DeepSeek models do not support use_vision=True yet. Setting use_vision=False for now...')self.settings.use_vision = False- # Handle users trying to use use_vision=True with XAI models- if 'grok' in self.llm.model.lower():- self.logger.warning('⚠️ XAI models do not support use_vision=True yet. Setting use_vision=False for now...')+ # Handle users trying to use use_vision=True with XAI models that don't support it+ # grok-3 variants and grok-code don't support vision; grok-2 and grok-4 do+ model_lower = self.llm.model.lower()+ if 'grok-3' in model_lower or 'grok-code' in model_lower:+ self.logger.warning('⚠️ This XAI model does not support use_vision=True yet. Setting use_vision=False for now...')self.settings.use_vision = Falselogger.debug(