Skip to content

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

Format LLM exports after ruff suggestions

MagellaX71a1f1203743
diff --git a/browser_use/__init__.py b/browser_use/__init__.py
index 054bd077b..d275a4f16 100644
--- a/browser_use/__init__.py
+++ b/browser_use/__init__.py
@@ -60,11 +60,8 @@ if TYPE_CHECKING:
from browser_use.llm.browser_use.chat import ChatBrowserUse
from browser_use.llm.google.chat import ChatGoogle
from browser_use.llm.groq.chat import ChatGroq
-
from browser_use.llm.mistral.chat import ChatMistral
-
from browser_use.llm.oci_raw.chat import ChatOCIRaw
-
from browser_use.llm.ollama.chat import ChatOllama
from browser_use.llm.openai.chat import ChatOpenAI
from browser_use.llm.vercel.chat import ChatVercel
diff --git a/browser_use/llm/__init__.py b/browser_use/llm/__init__.py
index d86565947..d6d8464c9 100644
--- a/browser_use/llm/__init__.py
+++ b/browser_use/llm/__init__.py
@@ -35,11 +35,8 @@ if TYPE_CHECKING:
from browser_use.llm.deepseek.chat import ChatDeepSeek
from browser_use.llm.google.chat import ChatGoogle
from browser_use.llm.groq.chat import ChatGroq
-
from browser_use.llm.mistral.chat import ChatMistral
-
from browser_use.llm.oci_raw.chat import ChatOCIRaw
-
from browser_use.llm.ollama.chat import ChatOllama
from browser_use.llm.openai.chat import ChatOpenAI
from browser_use.llm.openrouter.chat import ChatOpenRouter
@@ -91,11 +88,8 @@ _LAZY_IMPORTS = {
'ChatDeepSeek': ('browser_use.llm.deepseek.chat', 'ChatDeepSeek'),
'ChatGoogle': ('browser_use.llm.google.chat', 'ChatGoogle'),
'ChatGroq': ('browser_use.llm.groq.chat', 'ChatGroq'),
-
'ChatMistral': ('browser_use.llm.mistral.chat', 'ChatMistral'),
-
'ChatOCIRaw': ('browser_use.llm.oci_raw.chat', 'ChatOCIRaw'),
-
'ChatOllama': ('browser_use.llm.ollama.chat', 'ChatOllama'),
'ChatOpenAI': ('browser_use.llm.openai.chat', 'ChatOpenAI'),
'ChatOpenRouter': ('browser_use.llm.openrouter.chat', 'ChatOpenRouter'),
diff --git a/browser_use/llm/models.py b/browser_use/llm/models.py
index 76e8d8a18..313548931 100644
--- a/browser_use/llm/models.py
+++ b/browser_use/llm/models.py
@@ -176,7 +176,6 @@ def get_llm_by_name(model_name: str):
api_key = os.getenv('GOOGLE_API_KEY')
return ChatGoogle(model=model, api_key=api_key)
-
# Mistral Models
elif provider == 'mistral':
api_key = os.getenv('MISTRAL_API_KEY')
@@ -238,7 +237,6 @@ def __getattr__(name: str) -> 'BaseChatModel':
elif name == 'ChatBrowserUse':
return ChatBrowserUse # type: ignore
-
# Handle model instances - these are the main use case
try:
return get_llm_by_name(name)
@@ -251,9 +249,7 @@ __all__ = [
'ChatOpenAI',
'ChatAzureOpenAI',
'ChatGoogle',
-
'ChatMistral',
-
'ChatCerebras',
'ChatBrowserUse',
]
@@ -262,7 +258,6 @@ if OCI_AVAILABLE:
__all__.append('ChatOCIRaw')
__all__ += [
-
'get_llm_by_name',
# OpenAI instances - created on demand
'openai_gpt_4o',
@@ -296,14 +291,12 @@ __all__ += [
'google_gemini_2_5_pro',
'google_gemini_2_5_flash',
'google_gemini_2_5_flash_lite',
-
# Mistral instances - created on demand
'mistral_large',
'mistral_medium',
'mistral_small',
'codestral',
'pixtral_large',
-
# Cerebras instances - created on demand
'cerebras_llama3_1_8b',
'cerebras_llama3_3_70b',
@@ -317,7 +310,6 @@ __all__ += [
# Browser Use instances - created on demand
'bu_latest',
'bu_1_0',
-
]
# NOTE: OCI backend is optional. The try/except ImportError and conditional __all__ are required