mirror of
https://github.com/browser-use/browser-use
synced 2026-05-13 17:56:35 +02:00
- 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>