Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/vast-pumas-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

Add improved support for Kimi 2.5 reasoning through AI SDK
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
"bluebird": ">=3.7.2",
"glob": ">=11.1.0",
"@types/react": "^18.3.23",
"@types/react-dom": "^18.3.5"
"@types/react-dom": "^18.3.5",
"zod": "3.25.76",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Mixed Zod majors via pnpm overrides can cause subtle runtime/type mismatches

This pins zod to 3.25.76 globally while also forcing @sap-ai-sdk/prompt-registry to use zod@^4. That will install two Zod majors in the repo, which can lead to issues like failed instanceof ZodError checks and schema/value incompatibilities across package boundaries.

If possible, consider aligning on a single Zod major (or ensure any cross-boundary error handling avoids instanceof/direct class identity checks).

"@sap-ai-sdk/prompt-registry>zod": "^4.0.0"
}
}
}
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"clean": "rimraf dist .turbo"
},
"dependencies": {
"zod": "^3.25.61"
"zod": "3.25.76"
},
"devDependencies": {
"@roo-code/config-eslint": "workspace:^",
Expand Down
33 changes: 13 additions & 20 deletions packages/types/src/providers/moonshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,6 @@ export type MoonshotModelId = keyof typeof moonshotModels
export const moonshotDefaultModelId: MoonshotModelId = "kimi-k2-thinking"

export const moonshotModels = {
// kilocode_change start
"kimi-k2.5": {
maxTokens: 32_000,
contextWindow: 262_144, // 256K
supportsImages: true, // Native multimodal
supportsPromptCache: true,
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsTemperature: false, // Based on API specs
defaultTemperature: 1.0, // Default for thinking mode
supportsReasoningBudget: true,
supportsReasoningEffort: true,
preserveReasoning: true,
inputPrice: 0.6, // $0.60 per million (cache miss)
outputPrice: 3.0, // $3.00 per million
cacheWritesPrice: 0,
cacheReadsPrice: 0.1, // $0.10 per million (cache hit)
description: `Kimi K2.5 is Kimi's most versatile multimodal model with native vision support. Supports both thinking mode (default, temp=1.0) and instant mode (thinking disabled, temp=0.6). Features 256K context, vision understanding, and agent capabilities.`,
},
// kilocode_change end
"kimi-for-coding": {
maxTokens: 32_000,
contextWindow: 131_072,
Expand Down Expand Up @@ -111,6 +91,19 @@ export const moonshotModels = {
defaultTemperature: 1.0,
description: `The kimi-k2-thinking model is a general-purpose agentic reasoning model developed by Moonshot AI. Thanks to its strength in deep reasoning and multi-turn tool use, it can solve even the hardest problems.`,
},
"kimi-k2.5": {
maxTokens: 16_384,
contextWindow: 262_144,
supportsImages: false,
supportsPromptCache: true,
inputPrice: 0.6, // $0.60 per million tokens (cache miss)
outputPrice: 3.0, // $3.00 per million tokens
cacheReadsPrice: 0.1, // $0.10 per million tokens (cache hit)
supportsTemperature: true,
defaultTemperature: 1.0,
description:
"Kimi K2.5 is the latest generation of Moonshot AI's Kimi series, featuring improved reasoning capabilities and enhanced performance across diverse tasks.",
},
} as const satisfies Record<string, ModelInfo>

export const MOONSHOT_DEFAULT_TEMPERATURE = 0.6
Loading
Loading