Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

use just raise to preserve traceback in anthropic fallback

Laith Weinberger69c7df060fb6
diff --git a/browser_use/llm/anthropic/chat.py b/browser_use/llm/anthropic/chat.py
index e09baec7d..274d72452 100644
--- a/browser_use/llm/anthropic/chat.py
+++ b/browser_use/llm/anthropic/chat.py
@@ -240,7 +240,7 @@ class ChatAnthropic(BaseChatModel):
except json.JSONDecodeError:
pass
else:
- raise e
+ raise
return ChatInvokeCompletion(
completion=output_format.model_validate(_input),
usage=usage,
diff --git a/browser_use/llm/aws/chat_anthropic.py b/browser_use/llm/aws/chat_anthropic.py
index 2213e889a..4d4283a21 100644
--- a/browser_use/llm/aws/chat_anthropic.py
+++ b/browser_use/llm/aws/chat_anthropic.py
@@ -239,7 +239,7 @@ class ChatAnthropicBedrock(ChatAWSBedrock):
except json.JSONDecodeError:
pass
else:
- raise e
+ raise
return ChatInvokeCompletion(
completion=output_format.model_validate(_input),
usage=usage,