Skip to content

Commit 533d93e

Browse files
committed
feat: add kimi-k2.6-code-preview model support
1 parent 87b2a9d commit 533d93e

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

packages/console/app/src/routes/workspace/[id]/usage/graph-section.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ const MODEL_COLORS: Record<string, string> = {
112112
"grok-code": "#8B5CF6",
113113
"big-pickle": "#10B981",
114114
"kimi-k2": "#F59E0B",
115+
"kimi-k2.6-code-preview": "#D97706",
115116
"qwen3-coder": "#EC4899",
116117
"glm-4.6": "#14B8A6",
117118
}

packages/opencode/src/provider/transform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ export namespace ProviderTransform {
346346
export function topP(model: Provider.Model) {
347347
const id = model.id.toLowerCase()
348348
if (id.includes("qwen")) return 1
349-
if (["minimax-m2", "gemini", "kimi-k2.5", "kimi-k2p5", "kimi-k2-5"].some((s) => id.includes(s))) {
349+
if (["minimax-m2", "gemini", "kimi-k2.5", "kimi-k2p5", "kimi-k2-5", "kimi-k2.6-code-preview"].some((s) => id.includes(s))) {
350350
return 0.95
351351
}
352352
return undefined
@@ -807,7 +807,7 @@ export namespace ProviderTransform {
807807
const modelId = input.model.api.id.toLowerCase()
808808
if (
809809
(input.model.api.npm === "@ai-sdk/anthropic" || input.model.api.npm === "@ai-sdk/google-vertex/anthropic") &&
810-
(modelId.includes("k2p5") || modelId.includes("kimi-k2.5") || modelId.includes("kimi-k2p5"))
810+
(modelId.includes("k2p5") || modelId.includes("kimi-k2.5") || modelId.includes("kimi-k2p5") || modelId.includes("kimi-k2.6-code-preview"))
811811
) {
812812
result["thinking"] = {
813813
type: "enabled",

packages/opencode/test/tool/fixtures/models-api.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3571,6 +3571,23 @@
35713571
"open_weights": true,
35723572
"cost": { "input": 0.5, "output": 2.85 },
35733573
"limit": { "context": 262144, "output": 262144 }
3574+
},
3575+
"kimi-k2.6-code-preview": {
3576+
"id": "kimi-k2.6-code-preview",
3577+
"name": "Kimi K2.6 Code Preview",
3578+
"family": "kimi",
3579+
"attachment": true,
3580+
"reasoning": true,
3581+
"tool_call": true,
3582+
"interleaved": { "field": "reasoning_content" },
3583+
"temperature": true,
3584+
"knowledge": "2024-10",
3585+
"release_date": "2026-04",
3586+
"last_updated": "2026-04",
3587+
"modalities": { "input": ["text", "image", "video"], "output": ["text"] },
3588+
"open_weights": true,
3589+
"cost": { "input": 0.6, "output": 3, "cache_read": 0.08 },
3590+
"limit": { "context": 262144, "output": 65536 }
35743591
}
35753592
}
35763593
},
@@ -17840,6 +17857,23 @@
1784017857
"open_weights": true,
1784117858
"cost": { "input": 0, "output": 0, "cache_read": 0, "cache_write": 0 },
1784217859
"limit": { "context": 262144, "output": 32768 }
17860+
},
17861+
"kimi-k2.6-code-preview": {
17862+
"id": "kimi-k2.6-code-preview",
17863+
"name": "Kimi K2.6 Code Preview",
17864+
"family": "kimi-thinking",
17865+
"attachment": true,
17866+
"reasoning": true,
17867+
"tool_call": true,
17868+
"structured_output": true,
17869+
"temperature": true,
17870+
"knowledge": "2025-01",
17871+
"release_date": "2026-04",
17872+
"last_updated": "2026-04",
17873+
"modalities": { "input": ["text", "image", "video"], "output": ["text"] },
17874+
"open_weights": true,
17875+
"cost": { "input": 0, "output": 0, "cache_read": 0, "cache_write": 0 },
17876+
"limit": { "context": 262144, "output": 65536 }
1784317877
}
1784417878
}
1784517879
},

0 commit comments

Comments
 (0)