Commit Graph

4615 Commits

Author SHA1 Message Date
shawn pana 7e92031593 Merge branch 'main' into install-lite 2026-03-26 09:43:49 -07:00
ShawnPana e3a994a39d fix: non-fatal validate + curl check before use 2026-03-26 09:40:35 -07:00
ShawnPana 2f41a42eab extract CLI deps to requirements-cli.txt + add CI test 2026-03-26 09:27:18 -07:00
ShawnPana 822a4d948b add aiohttp to lite install deps (needed by LocalBrowserWatchdog._wait_for_cdp_url) 2026-03-26 09:15:29 -07:00
ShawnPana a2cbe678b7 add lightweight CLI install script 2026-03-26 09:15:29 -07:00
laithrw 6094cddd90 Merge branch 'main' into fix/mcp-browser-click-oneof-schema 2026-03-26 10:59:46 -04:00
laithrw 4c883feb7c Merge branch 'main' into fix/cloud-session-stop-cdp-reconnect 2026-03-25 19:34:25 -04:00
laithrw 4950c3baa1 Merge branch 'main' into fix-4352 2026-03-25 19:32:05 -04:00
Laith Weinberger 9b401cf04c fix tunnel process kill and daemon spawn on windows 2026-03-25 19:28:47 -04:00
laithrw 8fcbe9f2fa Merge branch 'main' into fix/step-timeout-counter-and-stale-history 2026-03-25 19:22:19 -04:00
laithrw f74a4435b1 Merge branch 'main' into fix-4510 2026-03-25 19:18:32 -04:00
Laith Weinberger 69c7df060f use just raise to preserve traceback in anthropic fallback 2026-03-25 19:16:50 -04:00
Laith Weinberger 8e8ab73575 fix anthropic action field double-serialization 2026-03-25 19:12:56 -04:00
laithrw 4f268e4390 Merge branch 'main' into override-price-config 2026-03-25 18:20:20 -04:00
Laith Weinberger f6c6046215 fix pricing url cache cleanup and remove phantom code_use module 2026-03-25 18:16:53 -04:00
laithrw a2313d9665 Merge branch 'main' into feature/cdp-navigation-timeout 2026-03-25 17:30:42 -04:00
Laith Weinberger a31809b83d preserve error exit code 2026-03-25 17:15:34 -04:00
laithrw b845cb262f Merge branch 'main' into fix-4492 2026-03-25 17:11:56 -04:00
Laith Weinberger c9ea2fb1cf fix daemon orphaning when external browser dies on --connect/--cdp-url 2026-03-25 17:07:03 -04:00
Laith Weinberger 393d2c5b0f rm pass 2026-03-25 16:56:36 -04:00
laithrw 4f33289c48 Merge branch 'main' into clawoss/fix/signal-handler-opt-out-4385 2026-03-25 16:19:49 -04:00
laithrw b6e17ceb05 Merge branch 'main' into fix/install-shell-detection 2026-03-25 16:13:42 -04:00
Laith Weinberger d897ffbd4c fix bedrock structured output w SchemaOptimizer to flatten schema 2026-03-25 15:48:12 -04:00
Matt Greathouse df47c01449 Merge branch 'main' into override-price-config 2026-03-25 08:06:42 -04:00
Mark McDonald c657ba72c3 Merge branch 'main' into fix-gemini-3-temperature 2026-03-25 11:57:43 +08:00
Magnus Müller d4b9e30188 Remove litellm from dependencies (supply chain attack CVE)
litellm versions 1.82.7 and 1.82.8 were backdoored on March 24, 2026
by TeamPCP via a compromised Trivy CI/CD pipeline. browser-use 0.12.3
shipped litellm>=1.82.2 (unpinned) as a core dependency, exposing
~6,900 users to the backdoored versions during the 4-hour window.

This commit:
- Removes litellm entirely from pyproject.toml (core and optional)
- Keeps ChatLiteLLM wrapper intact with a docstring noting
  `pip install litellm` is required separately
- litellm is already lazy-imported inside methods, so users who
  don't use ChatLiteLLM are never affected

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:29:44 -07:00
Laith Weinberger e44ce7ce73 fix linux profile detection for chromium users 2026-03-24 18:14:22 -04:00
Matt Greathouse 57ead32c32 Merge branch 'main' into override-price-config 2026-03-24 08:08:23 -04:00
revanthkumar96 1c4182d4ec Add nav_timeout parameter to control CDP Page.navigate() timeout
- Add nav_timeout parameter to navigate_to_url_and_wait() method
- Pass nav_timeout from NavigateToUrlEvent to control CDP navigation timeout
- Fix issue where TIMEOUT_NavigateToUrlEvent env var only controlled outer timeout but CDP call had hardcoded 20s timeout
- Add comprehensive test case to verify env var controls CDP timeout
2026-03-24 11:19:34 +05:30
matt-greathouse 61b2ee6c5b feat(tokens): allow overriding model pricing URL 2026-03-23 07:52:50 -04:00
matt-greathouse 1c5020050c feat(tokens): allow overriding model pricing URL 2026-03-23 07:52:48 -04:00
Mark McDonald f93f94f753 Merge branch 'main' into fix-gemini-3-temperature 2026-03-23 14:16:08 +08:00
Mark McDonald 90783e69b4 fix: set default temperature to 1.0 for gemini-3 models 2026-03-23 14:13:08 +08:00
warren618 c0a11dc61e fix: move state clear to after _prepare_context per review feedback
_prepare_context passes last_model_output/last_result to the message
manager for the "previous action result" prompt section. Clearing
them before context preparation drops this context.

Move the clear to after _prepare_context but before _get_next_action,
so prompt assembly still sees the previous step's output while
preventing stale data on timeout during the LLM call or action phase.
2026-03-23 11:42:11 +08:00
warren618 909e80a1b3 fix(agent): prevent stale history and stuck step counter on timeout
Two related bugs when step() is cancelled by timeout:

1. step() does not clear last_model_output/last_result at the start,
   so if timeout occurs before _get_next_action, _finalize() sees
   stale values from the previous step and records a duplicate history
   entry with wrong step numbers.

2. _finalize() early-returns when last_result is falsy, skipping the
   n_steps increment. On timeout, this means the while loop retries
   the same step number repeatedly.

Fix: clear last_model_output and last_result at step() entry, and
ensure _execute_step increments n_steps after a timeout if _finalize
did not already do so.
2026-03-23 11:25:37 +08:00
Ishan Shah bb40ff255b fix: mark install.sh as executable in git 2026-03-22 19:52:30 -07:00
Ishan Shah fddc133aa9 fix: detect uv installed via curl script 2026-03-22 19:39:49 -07:00
Laith Weinberger 29da480659 replace MV2 extensions with MV3 + remove chrome flags that block extension loading 2026-03-22 14:17:56 -04:00
Hirokazu Tanaka 65a57742f5 fix: align print_next_steps shell detection with configure_path
Ensure print_next_steps() falls back to .profile for non-bash/zsh
shells, matching the behavior of configure_path().
2026-03-22 14:41:36 +09:00
Hirokazu Tanaka ba8bdb56ba fix: use login shell instead of running shell for PATH configuration
When the install script is executed via `curl ... | bash`, it always
runs in a bash process, so $BASH_VERSION is always set regardless of
the user's actual shell. This causes PATH to be written to ~/.bashrc
even for zsh users, making the `browser-use` command unavailable.

Use $SHELL (the user's login shell) instead of $BASH_VERSION/$ZSH_VERSION
to detect the correct shell RC file.

Fixes #4440
2026-03-22 14:36:36 +09:00
Saurav Panda 4a65aea6a9 Merge branch 'main' into auto-switch-new-tab 2026-03-21 17:17:32 -07:00
Saurav Panda 03de83a069 Merge branch 'main' into iframe-click-issue 2026-03-21 15:57:02 -07:00
Saurav Panda 3b8f2457b1 fix: index elements inside cross-origin iframes reliably 2026-03-21 15:54:35 -07:00
Laith Weinberger 43b5e4ce1d rm code agent 2026-03-21 02:05:42 -04:00
Saurav Panda e7a05cbe86 fix: auto-switch to new tabs after click and add checkbox toggle fallback
- AGI-569: after any click that opens a new tab, automatically dispatch
  SwitchTabEvent so the agent lands on the new page immediately instead
  of requiring a manual switch step (~877 occurrences)

- AGI-548: for <input type="checkbox/radio">, capture checked state
  before the CDP mouse click and verify it toggled afterward; if
  unchanged (custom-styled or shadow-DOM-backed inputs), fall back to
  JS element.click() and report the final checked state in metadata
  (~1,241 occurrences)
2026-03-20 12:43:58 -07:00
shawn pana a2c2fa33aa Merge branch 'main' into cli 2026-03-20 09:34:45 -07:00
reformedot 2675c52e65 Enhance User-Agent header handling in BrowserSession
- Updated the BrowserSession class to ensure the User-Agent header is set correctly for both local and remote connections.
- Introduced a utility function to retrieve the browser-use version and incorporated it into the User-Agent string.
- Ensured headers are consistently handled as dictionaries to avoid potential issues with None values.

This change improves the reliability of the CDP client communication by providing a proper User-Agent, which can be crucial for certain web interactions.
2026-03-19 23:33:10 -07:00
ShawnPana dbb356d2eb fall back to raw profile value when Chrome metadata can't be read
If list_chrome_profiles() returns empty (permissions, corrupt Local State,
first-run Chrome), skip resolution and use the profile value as-is instead
of always raising RuntimeError.
2026-03-19 23:14:31 -07:00
ShawnPana 566bca0a88 handle ping success:false case in ensure_daemon config check
Previous commit fixed the exception path. This fixes the case where
ping returns a response with success:false — same fallthrough bug.
2026-03-19 23:10:22 -07:00
ShawnPana edfd554f0f fix ensure_daemon falling through on ping failure with explicit config
When ping fails but daemon is alive, return instead of trying to spawn
a second daemon. The old daemon holds the socket so the new one can't
bind, causing silent config mismatch.
2026-03-19 23:06:31 -07:00