Commit Graph

16 Commits

Author SHA1 Message Date
Atharva Jaiswal 253b7f77ed Fix lmnr import crash when package raises TypeError (#4046)
When lmnr is installed but broken (e.g., on Python 3.13 with certain
package states), importing it raises TypeError instead of ImportError.
Since only ImportError was caught, the TypeError escaped and crashed
the entire application on startup.

Broaden the except clause to catch (ImportError, TypeError) so the
no-op fallback is used in both failure modes.
2026-02-15 17:54:45 +05:30
Chris Schnabl a28fdb6578 Code style 2025-09-23 20:03:26 -07:00
Chris Schnabl bd6ac42a2e Undo debug mode 2025-09-23 19:59:58 -07:00
Chris Schnabl ddfe530037 Test debug 2025-09-23 19:56:41 -07:00
Chris Schnabl a9d00f3b40 Add tags 2025-09-22 12:03:49 -07:00
Magnus Müller 059dd2ae7f asyncio laminar 2025-09-20 00:08:08 -07:00
Magnus Müller 13dce77c98 Update info logger to debug and clean up logs 2025-08-19 00:02:42 -07:00
Magnus Müller 6407c10918 laminar-ignore input output 2025-07-09 22:27:22 +02:00
Magnus Müller b6872ec3e5 change laminar debug secret 2025-07-09 16:51:18 +02:00
Nick Sweeting 9e9cce40f6 simplify error logging and fix timeouts 2025-07-07 21:29:03 -07:00
Magnus Müller 0f0e3cb4df Fix debug check 2025-07-07 15:32:30 +02:00
Magnus Müller 840add546c Fix linting 2025-07-07 14:53:51 +02:00
Magnus Müller 654b356321 Update observability decorators to use Literal for span_type
- Changed the type of the `span_type` parameter in the `observe` and `observe_debug` functions from `str | None` to `Literal['DEFAULT', 'LLM', 'TOOL']` for better type safety and clarity.
- Removed unnecessary conditional checks for `span_type` in the decorator implementations.
2025-07-07 13:36:13 +02:00
Magnus Müller 292b5972d6 Refactor observability logging and simplify decorator usage
- Commented out logging statements in `_is_debug_mode` to reduce verbosity.
- Simplified the usage of `@observe_debug` and `_lmnr_observe` decorators in `BrowserSession` by consolidating arguments into a single `kwargs` dictionary for better readability and maintainability.
2025-07-07 13:20:05 +02:00
Magnus Müller 5e5dfd3eda Add span_type 2025-07-05 23:25:47 +02:00
Magnus Müller a4c9b992ba Add observability module for browser-use with optional lmnr integration and debug mode support 2025-07-05 23:08:00 +02:00