fix: disable system message tools for kimi k2

This commit is contained in:
uinstinct 2025-08-20 19:16:14 +05:30
parent 4b51607595
commit 8021853ee4

View file

@ -21,9 +21,12 @@ import { ModelDescription } from "../index.d";
export function shouldAutoEnableSystemMessageTools(
model: ModelDescription,
): boolean | undefined {
// Auto-enable for OpenRouter, but exclude Claude models which have good native tool calling
// Auto-enable for OpenRouter, but exclude Claude/KimiK2 models which have good native tool calling
if (model.provider === "openrouter") {
return !model.model.toLowerCase().includes("claude");
return (
!model.model.toLowerCase().includes("claude") &&
!model.model.toLowerCase().includes("kimi-k2")
);
}
// No auto-preference for all other providers - use manual setting