π OpenHands: AI-Driven Development
fix: set `tool_choice` to none for non-fncall models (#6652)
Xingyao Wang52ac2729f798
diff --git a/openhands/llm/llm.py b/openhands/llm/llm.pyindex 9c82dd0886..ff3c62772b 100644--- a/openhands/llm/llm.py+++ b/openhands/llm/llm.py@@ -232,6 +232,9 @@ class LLM(RetryMixin, DebugMixin):kwargs['stop'] = STOP_WORDSmock_fncall_tools = kwargs.pop('tools')+ kwargs['tool_choice'] = (+ 'none' # force no tool calling because we're mocking it - without it, it will cause issue with sglang+ )# if we have no messages, something went very wrongif not messages: