-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Refactor BrowserSession
to remove Playwright in favor of cdp-use
and bubus
#2573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…to new-extraction-layer-magnus
…rowser-use into local-remote-split
Auto-generated PR for branch: hot-fix/reasoning-models <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Improved the check for reasoning models to use a case-insensitive substring match, making model detection more reliable. <!-- End of auto-generated description by cubic. -->
…ass to streamline configuration
…ss for improved model performance
…dling of missing values
…e error handling in BaseWatchdog to manage timeouts gracefully
…detection/download. mostly coded by claude-opus-4.1
…rowser-use into local-remote-split
Bugbot found 1 bugTo see it, activate your membership in the Cursor dashboard. |
bugbot run |
) | ||
break | ||
) | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Multi-action Fails Due to Unstable Node Hashing
The multi_act
method incorrectly uses Python's default hash()
for EnhancedDOMTreeNode
objects to detect element changes (index changes or new elements). Since these objects are recreated with each browser state snapshot, their identity-based hashes constantly change, leading to false positives. This causes multi-action sequences to prematurely abort. A stable identifier like element.element_hash
should be used for comparisons instead.
if name_a != name_b: # Skip self-comparison | ||
assert name_a not in name_b, ( | ||
f'Event with name {name_a} is a substring of {name_b}, all events must be completely unique to avoid find-and-replace accidents' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Import Validation Fails on Non-Class Objects
The import-time validation in browser_use/browser/events.py
calls issubclass()
on all non-underscore globals. This causes a TypeError
and crashes module import when encountering non-class objects (e.g., typing.Literal
, typing.Any
, pydantic.Field
). The check must be guarded with inspect.isclass()
.
…Introduced methods for cleaning HTML, validating content relevance, and intelligently truncating long content. Enhanced markdown conversion and improved error handling for content extraction failures.
…TML to markdown conversion using markdownify, improved error handling, and streamlined memory management for extracted content. Removed obsolete methods related to HTML cleaning and content validation.
…mote-split-type-fix-auto-enter
Summary by cubic
Split the BrowserSession logic into separate models for local and remote browser connections. This makes the codebase easier to maintain and extend.