Commit Graph

4644 Commits

Author SHA1 Message Date
Nick Sweeting
d2dbe538c9 disable bubus WAL for now 2025-07-18 12:49:39 -07:00
Magnus Müller
64f0e22176 feat: add CDP URL to Agent Telemetry events (#2299)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Added the CDP URL to Agent Telemetry events so each event now includes
the browser session's CDP endpoint when available.

<!-- End of auto-generated description by cubic. -->
2025-07-18 16:46:50 +02:00
Magnus Müller
c42aae3eaf Fix line formatting in agent service for cdp_url assignment 2025-07-18 16:37:24 +02:00
Magnus Müller
3179fb7686 Merge branch 'main' into feat/cdp-url-agent-event 2025-07-18 16:32:07 +02:00
Magnus Müller
645808f86c dont refresh page if index is not there (#2481)
Auto-generated PR for: dont refresh page if index is not there
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Stopped refreshing the page when an element index is missing and now
raise an exception instead. This prevents unnecessary state updates and
gives a clear error if the index does not exist.

<!-- End of auto-generated description by cubic. -->
2025-07-18 16:06:45 +02:00
Magnus Müller
07262b3ae8 Fix tests 2025-07-18 16:00:05 +02:00
Magnus Müller
e6df7081be Dont use selector_map inside the controller - use get_dom_element_by_index 2025-07-18 13:08:43 +02:00
Magnus Müller
74f2be9f1e Simplify element exist checks in click and input_text 2025-07-18 13:06:07 +02:00
Magnus Müller
f9511deb4b If click fails just raise error, because in the next step we will get the new state again 2025-07-18 13:04:56 +02:00
Magnus Müller
225e5532de Refactor scrolling logic in service.py to improve error handling and streamline element-specific scrolling. Removed commented-out code for accessibility tree retrieval and enhanced logging for debugging scroll attempts. 2025-07-18 13:04:06 +02:00
Magnus Müller
6f117bcbdc dont refresh page if index is not there 2025-07-18 12:57:00 +02:00
Mert Unsal
aeb851f853 Update docs custom action page type (#2479)
Update `Page` type imports in documentation and examples to resolve type
conflicts.

The `browser_use` controller injects a union type for `Page` (supporting
both Playwright and Patchright pages for normal and stealth modes).
Previous examples imported `Page` directly from `playwright.async_api`,
leading to `ValueError` due to type mismatch. This PR updates imports to
`browser_use.browser.types.Page` for correct type resolution.

---

[Slack
Thread](https://browser-use.slack.com/archives/D092QUQDC56/p1752831634841859?thread_ts=1752831634.841859&cid=D092QUQDC56)
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Updated `Page` and `ElementHandle` imports in docs and examples to use
`browser_use.browser.types` for correct type resolution and to prevent
type conflicts.

<!-- End of auto-generated description by cubic. -->
2025-07-18 11:52:41 +02:00
Cursor Agent
fcfd80bbca Update import paths for Playwright types in custom functions
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-07-18 09:42:52 +00:00
Mert Unsal
6f2661154f Resolve markdown-pdf licensing issue (#2478)
Lock markdown-pdf dependency to version 1.5 to resolve AGPL-3.0 license
conflict.

Versions of `markdown-pdf` from 1.6 onwards are licensed under AGPL-3.0,
which is incompatible with the project's MIT license. Pinning the
dependency to version 1.5 avoids this conflict.

---

[Slack
Thread](https://browser-use.slack.com/archives/D092QUQDC56/p1752830754000909?thread_ts=1752830754.000909&cid=D092QUQDC56)
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Pinned the markdown-pdf dependency to version 1.5 to avoid AGPL-3.0
license conflicts and ensure compatibility with the project's MIT
license.

<!-- End of auto-generated description by cubic. -->
2025-07-18 11:31:48 +02:00
Cursor Agent
9856306ba4 Pin markdown-pdf to version 1.5 to ensure compatibility
Co-authored-by: mailmertunsal <mailmertunsal@gmail.com>
2025-07-18 09:27:48 +00:00
Mert Unsal
0d45263910 Fix: ChatOpenAI sends "temperature" parameter, that is not supported in O3 and O4-mini (#2468)
Fix Issue https://github.com/browser-use/browser-use/issues/2467 where
the `ChatOpenAI` class always sends temperature, which is unsupported in
some models like `o3` and `o4-mini`.

Lint and test completed successfully.
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Fixed an issue where ChatOpenAI always sent the temperature parameter,
causing errors with models like o3 and o4-mini that do not support it.

- **Bug Fixes**
- Only include the temperature parameter if it is set, ensuring
compatibility with all supported models.

<!-- End of auto-generated description by cubic. -->
2025-07-17 13:25:50 +02:00
Tom Mahler
4525153d24 refactor reasoning_effort_dict to model_params for a more appropriate name 2025-07-17 10:58:09 +03:00
Tom Mahler
177854d4f2 refactor model_params dict for consistency 2025-07-17 10:56:30 +03:00
Tom Mahler
460de46c51 add temperature to model params only if it is not None 2025-07-17 10:55:25 +03:00
Mert Unsal
53c4591ae7 New release (#2463) 0.5.5 2025-07-16 19:34:35 +02:00
mertunsall
f97d5698dc bump 2025-07-16 19:34:07 +02:00
Mert Unsal
ac8e6dc47a support tool calling with groq (#2459)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Added support for tool calling with Groq models, allowing structured
output using either tool calling or JSON schema based on the model.

- **New Features**
  - Supports tool calling for models like moonshotai/kimi-k2-instruct.
- Chooses between tool calling and JSON schema automatically for
structured outputs.

<!-- End of auto-generated description by cubic. -->
2025-07-16 13:08:37 +02:00
mertunsall
6e85f8602d support tool calling with groq 2025-07-16 11:13:04 +02:00
Nick Sweeting
9cc53f6e78 Fix: Only configure MCP server logging when server is instantiated, n… (#2456) 2025-07-15 22:18:43 -07:00
claude[bot]
3183a3ae73 Fix ruff formatting in __init__.py
Add missing blank line after import statement to comply with ruff formatting rules.

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-16 02:23:49 +00:00
Nick Sweeting
c974ae8dc6 Merge branch 'main' into claude/issue-2449-20250715_214903 2025-07-15 19:20:26 -07:00
Nick Sweeting
797408d8fa fix session reuse hanging in CI 2025-07-15 19:07:14 -07:00
Nick Sweeting
77e6e0760a Merge branch 'main' into claude/issue-2449-20250715_214903 2025-07-15 16:35:28 -07:00
Nick Sweeting
2c9eaf700a Update claude.yml 2025-07-15 18:42:37 -04:00
claude[bot]
6d5ce080b4 Move MCP server logging configuration before browser_use imports
- Call _configure_mcp_server_logging() at module level before any browser_use imports
- This ensures early log lines during import time are captured and redirected to stderr
- Remove redundant call from BrowserUseServer.__init__() since logging is already configured

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-15 22:02:42 +00:00
Nick Sweeting
c6d4286f0e Merge branch 'main' into claude/issue-2449-20250715_214903 2025-07-15 14:57:30 -07:00
claude[bot]
e3bc64d22c Fix: Only configure MCP server logging when server is instantiated, not on import
This fixes the issue where importing MCPClient would disable logging globally.

- Move logging configuration from module-level imports to BrowserUseServer.__init__()
- Add lazy import in __init__.py to avoid importing server module when only client is needed
- Create _configure_mcp_server_logging() function that only runs when server is actually used
- Environment variables now only set when BrowserUseServer is instantiated

Fixes #2449

Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
2025-07-15 21:54:51 +00:00
Nick Sweeting
f46fbc6ce5 Update claude.yml to use opus 2025-07-15 17:51:33 -04:00
Nick Sweeting
464a51512f more claude code permissions tweaks and set up python env 2025-07-15 17:42:52 -04:00
Nick Sweeting
520fc3abc4 Give claude code action more bash permissions 2025-07-15 17:29:09 -04:00
Mert Unsal
fdc2e8f74b Update screenshot handling for empty pages in BrowserSession (#2448)
Changed the behavior of the screenshot method to return 4px x 4px instead of
a 1x1 white PNG for empty pages. This adjustment accommodates the groq
LLaMa models, which does not accept 1px x 1px images.
2025-07-15 14:24:38 +02:00
mertunsall
8a634327ae fix? 2025-07-15 14:17:06 +02:00
mertunsall
8e8cf1cf26 fix tests 2025-07-15 14:08:36 +02:00
mertunsall
280b37d40e fix different way 2025-07-15 14:05:15 +02:00
mertunsall
4de08c4ae9 fix more tests 2025-07-15 13:58:43 +02:00
mertunsall
52b856a6b7 fix tests 2025-07-15 13:55:56 +02:00
mertunsall
e46e60f802 fix message 2025-07-15 13:52:28 +02:00
mertunsall
3263e6751f Update screenshot handling for empty pages in BrowserSession
Changed the behavior of the screenshot method to return None instead of a 1x1 white PNG for empty pages. This adjustment accommodates the groq LLaMa models, which does not accept 1px x 1px images.
2025-07-15 13:38:49 +02:00
Nick Sweeting
744b6e96d3 Fix incorrect pip install prompt for CLI addon (#2442) 2025-07-14 15:12:17 -07:00
Fureigh
b85b4b4e4d Fix incorrect pip install prompt for CLI addon
The install instruction for the `browser-use[cli]` addon was
missing quotes, which can cause issues in some shells.

Updated to `pip install "browser-use[cli]"` to ensure correct
behavior across environments.
2025-07-14 14:21:20 -07:00
Magnus Müller
7d1b82bd65 lmnr ignore input (#2440)
Auto-generated PR for: lmnr ignore input
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Updated the navigate method to ignore input and output when using the
observe_debug decorator.

<!-- End of auto-generated description by cubic. -->
2025-07-14 15:08:12 +02:00
Magnus Müller
ed3448cca2 lmnr ignore input 2025-07-14 15:07:41 +02:00
Mert Unsal
e2bebe8552 Limit wait action to 10 seconds (#2437)
Cap the wait action at a maximum of 10 seconds to prevent excessively
long waits.
2025-07-14 13:40:37 +02:00
Mert Unsal
e655986bab Update browser_use/controller/service.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-07-14 13:33:03 +02:00
mertunsall
dbb4222141 precommit run 2025-07-14 13:32:29 +02:00