Compare commits

...

2 Commits

Author SHA1 Message Date
Saoud Rizwan 4acbc6ef86 Create smart-flies-eat.md 2025-07-16 16:11:01 -07:00
Saoud Rizwan ba0feaba5a Fix kimi2 provider sorting 2025-07-16 16:08:30 -07:00
2 changed files with 9 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Add additional Kimi K2 providers
+4 -2
View File
@@ -140,7 +140,7 @@ export async function createOpenRouterStream(
}
// hardcoded provider sorting for kimi-k2
const isKimiK2 = model.id.startsWith("moonshotai/kimi-k2")
const isKimiK2 = model.id === "moonshotai/kimi-k2"
openRouterProviderSorting = isKimiK2 ? undefined : openRouterProviderSorting
// @ts-ignore-next-line
@@ -158,7 +158,9 @@ export async function createOpenRouterStream(
...(reasoning ? { reasoning } : {}),
...(openRouterProviderSorting ? { provider: { sort: openRouterProviderSorting } } : {}),
// limit providers to only those that support the 131k context window
...(isKimiK2 ? { provider: { order: ["groq", "together"], allow_fallbacks: false } } : {}),
...(isKimiK2
? { provider: { order: ["groq", "together", "baseten", "parasail", "novita", "deepinfra"], allow_fallbacks: false } }
: {}),
})
return stream