From 8ecd3e343284a3079160288b59d9e58abef5fd13 Mon Sep 17 00:00:00 2001 From: Rasheed Elhindi Date: Thu, 29 Jan 2026 01:00:42 -0500 Subject: [PATCH] Fix Kimi/Moonshot integration: Add moonshot to non-standard providers - Adds provider === 'moonshot' || baseUrl.includes('moonshot.ai') to isNonStandard check - Forces supportsDeveloperRole: false for Moonshot models - Moonshot expects role: 'system' not role: 'developer' for system prompts - Fixes #3475: sessions_spawn and model switching now work with Kimi K2.5 Tested with: - moonshot/kimi-k2.5 - moonshot/kimi-k2-thinking - Verified: tool calls, reasoning mode, cross-session messaging all functional --- patches/@mariozechner__pi-ai@0.49.3.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 patches/@mariozechner__pi-ai@0.49.3.patch diff --git a/patches/@mariozechner__pi-ai@0.49.3.patch b/patches/@mariozechner__pi-ai@0.49.3.patch new file mode 100644 index 000000000..7f6baa29a --- /dev/null +++ b/patches/@mariozechner__pi-ai@0.49.3.patch @@ -0,0 +1,15 @@ +diff --git a/dist/providers/openai-completions.js b/dist/providers/openai-completions.js +index c4b291d86ce40b2df319c439263d16d67592d22e..769528bc7847b454ccb41ce2c184bb48ca13caee 100644 +--- a/dist/providers/openai-completions.js ++++ b/dist/providers/openai-completions.js +@@ -624,7 +624,9 @@ function detectCompat(model) { + baseUrl.includes("chutes.ai") || + isZai || + provider === "opencode" || +- baseUrl.includes("opencode.ai"); ++ baseUrl.includes("opencode.ai") || ++ provider === "moonshot" || ++ baseUrl.includes("moonshot.ai"); + const useMaxTokens = provider === "mistral" || baseUrl.includes("mistral.ai") || baseUrl.includes("chutes.ai"); + const isGrok = provider === "xai" || baseUrl.includes("api.x.ai"); + const isMistral = provider === "mistral" || baseUrl.includes("mistral.ai");