fix: dont show variants for kimi models that dont support them (#23696)

This commit is contained in:
Aiden Cline 2026-04-21 15:33:35 -04:00 committed by GitHub
commit 58232d896e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -410,7 +410,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
id.includes("glm") || id.includes("glm") ||
id.includes("mistral") || id.includes("mistral") ||
id.includes("kimi") || id.includes("kimi") ||
id.includes("k2p5") || id.includes("k2p") ||
id.includes("qwen") || id.includes("qwen") ||
id.includes("big-pickle") id.includes("big-pickle")
) )
@ -851,11 +851,11 @@ export function options(input: {
} }
} }
// Enable thinking by default for kimi-k2.5/k2p5 models using anthropic SDK // Enable thinking by default for kimi models using anthropic SDK
const modelId = input.model.api.id.toLowerCase() const modelId = input.model.api.id.toLowerCase()
if ( if (
(input.model.api.npm === "@ai-sdk/anthropic" || input.model.api.npm === "@ai-sdk/google-vertex/anthropic") && (input.model.api.npm === "@ai-sdk/anthropic" || input.model.api.npm === "@ai-sdk/google-vertex/anthropic") &&
(modelId.includes("k2p5") || modelId.includes("kimi-k2.5") || modelId.includes("kimi-k2p5")) (modelId.includes("k2p") || modelId.includes("kimi-k2.") || modelId.includes("kimi-k2p"))
) { ) {
result["thinking"] = { result["thinking"] = {
type: "enabled", type: "enabled",