Skip to content

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

Pass session id to judge LLM calls

MagMueller6c36054ae4ac
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index 5b427dedf..d70a107bd 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -1602,6 +1602,7 @@ class Agent(Generic[Context, AgentStructuredOutput]):
# Only pass request_type for ChatBrowserUse (other providers don't support it)
if self.judge_llm.provider == 'browser-use':
kwargs['request_type'] = 'judge'
+ kwargs['session_id'] = self.session_id
try:
response = await self.judge_llm.ainvoke(input_messages, **kwargs)