Skip to content

Commit 9e5ab89

Browse files
committed
Refine reasoning_models check in ChatOpenAI class
Updated the condition for checking reasoning_models to ensure it only evaluates if reasoning_models is not empty, improving code robustness.
1 parent 2b0045f commit 9e5ab89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser_use/llm/openai/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ async def ainvoke(
179179
if self.service_tier is not None:
180180
model_params['service_tier'] = self.service_tier
181181

182-
if any(str(m).lower() in str(self.model).lower() for m in self.reasoning_models):
182+
if self.reasoning_models and any(str(m).lower() in str(self.model).lower() for m in self.reasoning_models):
183183
model_params['reasoning_effort'] = self.reasoning_effort
184184
del model_params['temperature']
185185
del model_params['frequency_penalty']

0 commit comments

Comments
 (0)