🙌 OpenHands: AI-Driven Development
Add support for the groq hosted kimi-k2-instruct model in the functio… (#9759)
Regis David Souza Mesquita0daaf21607a8
diff --git a/openhands/llm/llm.py b/openhands/llm/llm.pyindex 554693cd54..0e31e74d19 100644--- a/openhands/llm/llm.py+++ b/openhands/llm/llm.py@@ -87,6 +87,7 @@ FUNCTION_CALLING_SUPPORTED_MODELS = ['gemini-2.5-pro','gpt-4.1','kimi-k2-0711-preview',+ 'kimi-k2-instruct',]REASONING_EFFORT_SUPPORTED_MODELS = [@@ -810,6 +811,8 @@ class LLM(RetryMixin, DebugMixin):message.function_calling_enabled = self.is_function_calling_active()if 'deepseek' in self.config.model:message.force_string_serializer = True+ if 'kimi-k2-instruct' in self.config.model and 'groq' in self.config.model:+ message.force_string_serializer = True# let pydantic handle the serializationreturn [message.model_dump() for message in messages]