Skip to content

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

Remove frequency_penalty parameter from model_params in ChatOpenAI class to streamline configuration

Magnus Müllerf1e6b630cff2
diff --git a/browser_use/llm/openai/chat.py b/browser_use/llm/openai/chat.py
index 34fe15973..7a305163d 100644
--- a/browser_use/llm/openai/chat.py
+++ b/browser_use/llm/openai/chat.py
@@ -182,7 +182,7 @@ class ChatOpenAI(BaseChatModel):
if any(str(m).lower() in str(self.model).lower() for m in ReasoningModels):
model_params['reasoning_effort'] = self.reasoning_effort
model_params['temperature'] = 1
- model_params['frequency_penalty'] = 0
+ del model_params['frequency_penalty']
if output_format is None:
# Return string response