From d8bf5bf73133ef9aba1b61cb1beaf9b1be89bfa5 Mon Sep 17 00:00:00 2001 From: enyst Date: Wed, 12 Nov 2025 23:07:07 +0000 Subject: [PATCH] chore(lint): apply pre-commit formatting to llm.py\n\nRan pre-commit on PR files after make build to satisfy repo linters.\n\nCo-authored-by: openhands --- openhands/llm/llm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openhands/llm/llm.py b/openhands/llm/llm.py index 08b82a6b28..b94ed3bc2b 100644 --- a/openhands/llm/llm.py +++ b/openhands/llm/llm.py @@ -192,9 +192,9 @@ class LLM(RetryMixin, DebugMixin): # Prefer temperature (drop top_p) if both are specified. _model_lower = self.config.model.lower() # Apply to Opus 4.1 and Sonnet 4 models to avoid API errors - if (('claude-opus-4-1' in _model_lower) or ('claude-sonnet-4' in _model_lower)) and ( - 'temperature' in kwargs and 'top_p' in kwargs - ): + if ( + ('claude-opus-4-1' in _model_lower) or ('claude-sonnet-4' in _model_lower) + ) and ('temperature' in kwargs and 'top_p' in kwargs): kwargs.pop('top_p', None) # Add completion_kwargs if present