Skip to content

Commit f685cc2

Browse files
committed
feat(types): add Kimi K3 to moonshot and opencode-go providers
1 parent 7af1a8a commit f685cc2

5 files changed

Lines changed: 37 additions & 0 deletions

File tree

packages/types/src/__tests__/lite-llm.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ describe("LiteLLM preserveReasoning model detection", () => {
1212
})
1313

1414
it("matches provider-prefixed routed model names by their final segment", () => {
15+
expect(isLiteLLMPreserveReasoningModel("kimi-k3")).toBe(true)
1516
expect(isLiteLLMPreserveReasoningModel("deepseek/deepseek-reasoner")).toBe(true)
1617
expect(isLiteLLMPreserveReasoningModel("bedrock/moonshot.kimi-k2-thinking")).toBe(true)
1718
expect(isLiteLLMPreserveReasoningModel("fireworks_ai/accounts/fireworks/models/kimi-k2p7-code")).toBe(true)

packages/types/src/__tests__/opencode-go.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ describe("opencode-go registry", () => {
2121
"glm-5",
2222
"glm-5.1",
2323
"glm-5.2",
24+
"kimi-k3",
2425
"kimi-k2.5",
2526
"kimi-k2.6",
2627
"mimo-v2.5",

packages/types/src/providers/lite-llm.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ export const LITELLM_PRESERVE_REASONING_MODEL_IDS = [
4848
"moonshot.kimi-k2-thinking",
4949
"kimi-k2p7-code",
5050

51+
// moonshot.ts, opencode-go.ts
52+
"kimi-k3",
53+
5154
// zai.ts
5255
"glm-4.7",
5356
"glm-5",

packages/types/src/providers/moonshot.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ export type MoonshotModelId = keyof typeof moonshotModels
66
export const moonshotDefaultModelId: MoonshotModelId = "kimi-k2-0905-preview"
77

88
export const moonshotModels = {
9+
"kimi-k3": {
10+
maxTokens: 131_072, // Default max_completion_tokens (configurable up to 1,048,576)
11+
contextWindow: 1_048_576, // 1M tokens
12+
supportsImages: true, // Native visual understanding (text, image, video)
13+
supportsPromptCache: true, // Automatic context caching
14+
supportsReasoningEffort: ["low", "high", "max"], // Always reasons; default "max"
15+
reasoningEffort: "max",
16+
preserveReasoning: true,
17+
inputPrice: 3.0, // $3.00 per million tokens (cache miss)
18+
outputPrice: 15.0, // $15.00 per million tokens
19+
cacheWritesPrice: 0, // $0 per million tokens (cache miss)
20+
cacheReadsPrice: 0.3, // $0.30 per million tokens (cache hit)
21+
defaultTemperature: 1.0, // temperature is fixed at 1.0
22+
description: `Kimi K3 is Kimi's most capable flagship model with 2.8 trillion parameters, native visual understanding, and a 1M-token context window, designed for long-horizon coding, knowledge work, and deep reasoning. Thinking is always enabled with configurable reasoning effort (low/high/max, default max).`,
23+
},
924
"kimi-k2-0711-preview": {
1025
maxTokens: 32_000,
1126
contextWindow: 131_072,

packages/types/src/providers/opencode-go.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,23 @@ export const opencodeGoModels: Record<string, ModelInfo> = {
104104
},
105105

106106
// --- Moonshot Kimi ---
107+
"kimi-k3": {
108+
maxTokens: 131_072, // Default max_completion_tokens (configurable up to 1,048,576)
109+
contextWindow: 1_048_576,
110+
supportsImages: false,
111+
supportsPromptCache: true,
112+
supportsMaxTokens: true,
113+
supportsReasoningEffort: ["low", "high", "max"], // Always reasons; default "max"
114+
reasoningEffort: "max",
115+
preserveReasoning: true,
116+
defaultTemperature: 1.0,
117+
// Go pricing matches Moonshot direct ($3 in / $0.30 cache / $15 out per 1M tokens).
118+
inputPrice: 3.0,
119+
outputPrice: 15.0,
120+
cacheReadsPrice: 0.3,
121+
description:
122+
"Kimi K3 is Moonshot AI's flagship model with 2.8 trillion parameters, a 1M context window, and always-on reasoning with configurable effort (low/high/max). Available via the Opencode Go plan.",
123+
},
107124
"kimi-k2.5": {
108125
maxTokens: 16_384,
109126
contextWindow: 262_144,

0 commit comments

Comments
 (0)