Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
fix openai cost calculation
mertunsall512060c546fd
diff --git a/browser_use/llm/openai/chat.py b/browser_use/llm/openai/chat.pyindex 2b49ea20f..99b3198ab 100644--- a/browser_use/llm/openai/chat.py+++ b/browser_use/llm/openai/chat.py@@ -105,7 +105,8 @@ class ChatOpenAI(BaseChatModel):prompt_cache_creation_tokens=None,prompt_image_tokens=None,# Completion- completion_tokens=response.usage.completion_tokens,+ completion_tokens=response.usage.completion_tokens+ + (response.usage.completion_tokens_details.reasoning_tokens or 0),total_tokens=response.usage.total_tokens,)if response.usage is not None