Skip to content

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

remove litellm, slight speedup parser

Gregor Žunič56986f4889ad
diff --git a/requirements.txt b/requirements.txt
index 548b57f13..f43d37271 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,7 +5,6 @@ beautifulsoup4==4.12.3
langchain==0.3.7
# langchain-core==0.3.15
langchain-openai==0.2.5
-litellm==1.51.3
pydantic==2.9.2
pytest==8.3.3
pytest-asyncio==0.24.0
diff --git a/src/agent/views.py b/src/agent/views.py
index baf76a652..4e1eaf248 100644
--- a/src/agent/views.py
+++ b/src/agent/views.py
@@ -1,8 +1,6 @@
from typing import Optional
-from litellm import ConfigDict
from pydantic import BaseModel
-from typing_extensions import Unpack
from src.controller.views import ControllerActions
diff --git a/src/dom/service.py b/src/dom/service.py
index 61da3b376..81b6a7bf5 100644
--- a/src/dom/service.py
+++ b/src/dom/service.py
@@ -25,7 +25,7 @@ class DomService:
"""
# Parse HTML content using BeautifulSoup
- soup = BeautifulSoup(html_content, 'html.parser')
+ soup = BeautifulSoup(html_content, 'lxml')
candidate_elements: list[Tag | NavigableString] = []
dom_queue = [element for element in soup.body.children] if soup.body else []