Skip to content

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

Error for max token limit logger

magmuellere6e1d22e9cee
diff --git a/browser_use/agent/message_manager/service.py b/browser_use/agent/message_manager/service.py
index 193d25114..5731aaa2a 100644
--- a/browser_use/agent/message_manager/service.py
+++ b/browser_use/agent/message_manager/service.py
@@ -114,7 +114,7 @@ class MessageManager:
proportion_to_remove = tokens_to_remove / msg_tokens
if proportion_to_remove > 1:
raise ValueError(
- f'To many tokens - history is too long - reduce the system prompt or task. '
+ f'Max token limit reached - history is too long - reduce the system prompt or task. '
)
characters_to_remove = int(len(msg.message.content) * proportion_to_remove)
if isinstance(msg.message.content, str):