Skip to content

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

Fix token calculation

magmuellerbe31ac93599d
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index ba9d979ba..34b7f2306 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -189,7 +189,7 @@ class Agent:
self._update_message_history(state, parsed)
self._log_response(parsed)
self._save_conversation(input_messages, parsed)
- self._update_usage_metadata(response['raw'])
+ # self._update_usage_metadata(response['raw'])
return parsed
def _calc_token_cost(self) -> float: