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
This commit is contained in:
parent
c20035094d
commit
8ecd3e3432
15
patches/@mariozechner__pi-ai@0.49.3.patch
Normal file
15
patches/@mariozechner__pi-ai@0.49.3.patch
Normal file
@ -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");
|
||||||
Loading…
Reference in New Issue
Block a user