- Enhanced _json_schema_to_python_type to recursively handle array item types
- Arrays with ''items'' schema now properly return list[item_type] instead of plain list
- Supports nested types like list[str], list[float], and list[CustomModel]
- Added comprehensive test for array type inference in test_mcp_array_type_inference
This allows MCP tools with array parameters to have proper type hints and validation,
fixing issues where array parameters were losing their item type information.
Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
- Add BaseMessage import and type messages lists properly
- Use monkeypatch fixture for proper mocking instead of direct assignment
- Fix formatting issues (quotes, spacing) per ruff/ruff-format rules
Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
- Add type checking before accessing response.usage attribute
- Raise clear ModelProviderError when response is not a Message object
- Prevents AttributeError when API returns string errors instead of proper response
- Fixes issue #2559 where 502 errors caused ''str'' object has no attribute ''usage''
Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
- Move 4px placeholder screenshot constant to browser_use.browser.views
- Update all references to use the single definition
- Fix all lint errors and formatting issues
Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
- Skip 4px placeholder screenshots when creating GIFs
- Find first real screenshot for task frame instead of using placeholder
- Add comprehensive tests for GIF filtering behavior
- Fixes issue where GIFs were generated at 4px dimensions
Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
- Added ''menu'', ''menubar'', and ''menuitem'' to interactiveRoles set
- Uncommented ''listbox'' role
- Fixed tests to properly identify main ARIA menu by ID
- Added chromium_sandbox=False for CI environment compatibility
Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>