Auto-generated PR for branch: fix-popup-handling
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes JavaScript popup handling by auto-dismissing
alerts/confirm/prompts immediately via CDP across all frames. Simplifies
the flow to prevent crashes and focus issues, and makes
DialogOpenedEvent.frame_id optional for missing CDP frameIds.
- **Bug Fixes**
- Register Page.javascriptDialogOpening on both session and root CDP
clients to catch dialogs from any frame.
- Dismiss dialogs with Page.handleJavaScriptDialog using session
fallbacks (detected session → agent focus) with short timeouts.
- PopupsWatchdog no longer listens to or emits DialogOpenedEvent; it
only listens to TabCreatedEvent.
- **Migration**
- If you relied on DialogOpenedEvent from PopupsWatchdog, remove those
listeners; dialogs are now dismissed silently.
- DialogOpenedEvent.frame_id is now optional (can be None); update any
strict type checks.
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for branch: hooks-update
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Adds a new Lifecycle Hooks docs page that explains on_step_start and
on_step_end with working examples and what agent data is available.
Updates docs navigation and adds a redirect from /development/hooks to
/customize/hooks.
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for: remove lmnr from examples
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Removed Laminar from example scripts and a test to reduce setup friction
and prevent unintended instrumentation. Updated docs to show how to
disable Browser Use instrumentation, and bumped lmnr to 0.7.10 for
dev/eval.
- **Refactors**
- Removed lmnr imports/initialize from example scripts and the Gemini
image test.
- Examples now rely only on browser_use and their respective LLM SDKs.
- Docs: Laminar.initialize now shows
disabled_instruments={Instruments.BROWSER_USE}.
- **Dependencies**
- Updated lmnr[all] to 0.7.10 in eval and dev dependencies.
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for: dont wait 10 seconds if allowed_domains not set
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Remove the 10-second pause when allowed_domains is not set. We now log a
concise warning and continue without blocking; the message is simplified
and the interactive prompt was removed.
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for: fix-pil-import
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes PIL import errors and makes screenshot highlighting more robust by
adding Pillow as a runtime dependency and using cross-platform font
loading with caching to prevent crashes and memory leaks.
- **Bug Fixes**
- Added a cached, cross-platform font loader to avoid OSError on missing
fonts.
- Explicitly close image buffers and force GC to prevent memory leaks in
long runs.
- Exported cleanup_font_cache for external use.
- **Dependencies**
- Moved pillow>=11.2.1 to runtime dependencies and removed it from
dev-only deps.
<!-- End of auto-generated description by cubic. -->
Updated the type hint for the _FONT_CACHE dictionary to use a union type for better clarity. Modified the return type of get_cross_platform_font function to reflect the same change, enhancing type safety and readability.
…form.
When setting up task in browseruse, add a parameter for annotating
images, enabling browseruse to recognize some interactive components on
web pages.
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Add optional sample_images to Agent and message flow to include
annotated example images in the vision prompt, helping the agent
recognize interactive UI components. When provided, these images are
inserted before screenshots; behavior is unchanged if omitted.
- **New Features**
- Agent and MessageManager accept sample_images.
- Prompts inject sample_images into the user message ahead of
screenshots.
- Defaults to None for backward compatibility.
<!-- End of auto-generated description by cubic. -->
This will make "https://www.example.com" match "https://*.example.com",
which is currently no longer the case.
Also, update the "exact match" logic to match the logic used in pattern
matching.
A new test has been added to prevent regresssions.
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes allowed_domains pattern matching so scheme-based wildcards (e.g.,
https://*.example.com) correctly match full URLs (e.g.,
https://www.example.com). Also aligns exact match detection with pattern
logic.
- **Bug Fixes**
- Use fnmatch on the full URL when the pattern includes a scheme (://),
restoring matches like https://www.example.com against
https://*.example.com.
- Replace hardcoded scheme checks with ':// in pattern' for exact
matches to keep behavior consistent across schemes.
<!-- End of auto-generated description by cubic. -->
Currently, the major LLM lib constraints are very limiting. In my
project it is causing a ton of clashes with other popular LLM libraries
such as `pydantic-ai`, for example. I imagine a lot of `browser-use`
users are experiencing the same troubles.
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Relaxed major version pins for google-genai, openai, and anthropic to
allow minor/patch updates while blocking breaking majors. This reduces
dependency conflicts and improves install compatibility with other LLM
libraries.
- **Dependencies**
- google-genai: >=1.29.0,<2.0.0
- openai: >=1.99.2,<2.0.0
- anthropic: >=0.58.2,<1.0.0
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for: fix-wildcard-imports
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Replaced wildcard imports in browser_use.llm with lazy, typed model
access to reduce import overhead and improve IDE autocomplete while
keeping the API unchanged. Also reordered imports in the agentmail
example so env vars load before module imports.
- **Refactors**
- Removed from browser_use.llm.__init__ import *. Implemented
__getattr__ to proxy model names from browser_use.llm.models with
caching.
- Kept lazy imports for chat backends and added a clean cache for model
instances to avoid re-instantiation.
- Added type stubs for common model instances to improve editor hints.
- Moved imports in examples/integrations/agentmail/2fa.py below
load_dotenv to ensure correct env loading.
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for branch: update-agent-mail-example
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Adds a simple models interface for choosing LLMs and lets Agent
auto-select a default LLM via the DEFAULT_LLM env var. Updates the
AgentMail 2FA example and lowers max_actions_per_step to 4.
- **New Features**
- New models module for easy model access (e.g.,
models.azure_gpt_4_1_mini) and get_llm_by_name().
- Agent accepts llm=None and loads DEFAULT_LLM from env, falling back to
gpt-4.1-mini.
- Added DEFAULT_LLM to config/FlatEnvConfig.
- **Refactors**
- Replaced EmailController with EmailTools (supports injected inbox);
updated 2FA example to use AsyncAgentMail, models, and explicit Browser
path.
- Added lazy import example (examples/models/lazy_import.py).
- Reduced AgentSettings.max_actions_per_step default from 10 to 4.
<!-- End of auto-generated description by cubic. -->
Auto-generated PR for: change parameter chat google
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Aligns Google chat model defaults with OpenAI and adds output token
control for more predictable behavior across providers.
- **New Features**
- Set default temperature to 0.2 and add max_output_tokens (default
4096).
- Pass max_output_tokens to the GenerateContent config in ainvoke.
- **Dependencies**
- Add pydantic_settings>=2.10.1 to dev dependencies.
<!-- End of auto-generated description by cubic. -->