Merge pull request #818 from mickahouan/chore-pre-update-2026-01-12
feat: add Kimi K2 variants to Moonshot preset
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
## 2026.1.12-4
|
||||
|
||||
### Changes
|
||||
- Models/Moonshot: add Kimi K2 turbo + thinking variants to the preset + docs. (#818 — thanks @mickahouan)
|
||||
|
||||
### Fixes
|
||||
- Onboarding/Configure: refuse to proceed with invalid configs; run `clawdbot doctor` first to avoid wiping custom fields. (#764 — thanks @mukhtharcm)
|
||||
- Anthropic: merge consecutive user turns (preserve newest metadata) before validation to avoid “Incorrect role information” errors. (#804 — thanks @ThomsenDrake)
|
||||
|
||||
@@ -117,6 +117,8 @@ Moonshot uses OpenAI-compatible endpoints, so configure it as a custom provider:
|
||||
- Provider: `moonshot`
|
||||
- Auth: `MOONSHOT_API_KEY`
|
||||
- Example model: `moonshot/kimi-k2-0905-preview`
|
||||
- Other Kimi K2 model IDs: `moonshot/kimi-k2-turbo-preview`, `moonshot/kimi-k2-thinking`,
|
||||
`moonshot/kimi-k2-thinking-turbo`
|
||||
- CLI: `clawdbot onboard --auth-choice moonshot-api-key`
|
||||
|
||||
```json5
|
||||
|
||||
@@ -9,6 +9,11 @@ read_when:
|
||||
Moonshot provides the Kimi API with OpenAI-compatible endpoints. Configure the
|
||||
provider and set the default model to `moonshot/kimi-k2-0905-preview`.
|
||||
|
||||
Other current Kimi K2 model IDs:
|
||||
- `kimi-k2-turbo-preview`
|
||||
- `kimi-k2-thinking`
|
||||
- `kimi-k2-thinking-turbo`
|
||||
|
||||
## CLI setup
|
||||
|
||||
```bash
|
||||
@@ -24,7 +29,10 @@ clawdbot onboard --auth-choice moonshot-api-key
|
||||
defaults: {
|
||||
model: { primary: "moonshot/kimi-k2-0905-preview" },
|
||||
models: {
|
||||
"moonshot/kimi-k2-0905-preview": { alias: "Kimi K2" }
|
||||
"moonshot/kimi-k2-0905-preview": { alias: "Kimi K2" },
|
||||
"moonshot/kimi-k2-turbo-preview": { alias: "Kimi K2 Turbo" },
|
||||
"moonshot/kimi-k2-thinking": { alias: "Kimi K2 Thinking" },
|
||||
"moonshot/kimi-k2-thinking-turbo": { alias: "Kimi K2 Thinking Turbo" }
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -44,6 +52,33 @@ clawdbot onboard --auth-choice moonshot-api-key
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 256000,
|
||||
maxTokens: 8192
|
||||
},
|
||||
{
|
||||
id: "kimi-k2-turbo-preview",
|
||||
name: "Kimi K2 Turbo",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 256000,
|
||||
maxTokens: 8192
|
||||
},
|
||||
{
|
||||
id: "kimi-k2-thinking",
|
||||
name: "Kimi K2 Thinking",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 256000,
|
||||
maxTokens: 8192
|
||||
},
|
||||
{
|
||||
id: "kimi-k2-thinking-turbo",
|
||||
name: "Kimi K2 Thinking Turbo",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 256000,
|
||||
maxTokens: 8192
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -56,4 +91,6 @@ clawdbot onboard --auth-choice moonshot-api-key
|
||||
|
||||
- Model refs use `moonshot/<modelId>`.
|
||||
- Override pricing and context metadata in `models.providers` if needed.
|
||||
- If Moonshot publishes different context limits for a model, adjust
|
||||
`contextWindow` accordingly.
|
||||
- Use `https://api.moonshot.cn/v1` if you need the China endpoint.
|
||||
|
||||
@@ -278,12 +278,54 @@ function buildModelPresetPatches(base: Record<string, unknown>): Array<{
|
||||
contextWindow: 256000,
|
||||
maxTokens: 8192,
|
||||
},
|
||||
{
|
||||
id: "kimi-k2-turbo-preview",
|
||||
name: "Kimi K2 Turbo",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 256000,
|
||||
maxTokens: 8192,
|
||||
},
|
||||
{
|
||||
id: "kimi-k2-thinking",
|
||||
name: "Kimi K2 Thinking",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 256000,
|
||||
maxTokens: 8192,
|
||||
},
|
||||
{
|
||||
id: "kimi-k2-thinking-turbo",
|
||||
name: "Kimi K2 Thinking Turbo",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 256000,
|
||||
maxTokens: 8192,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
moonshot.push(setPrimary("moonshot/kimi-k2-0905-preview"));
|
||||
const moonshotAlias = safeAlias("moonshot/kimi-k2-0905-preview", "Kimi K2");
|
||||
if (moonshotAlias) moonshot.push(moonshotAlias);
|
||||
const moonshotTurboAlias = safeAlias(
|
||||
"moonshot/kimi-k2-turbo-preview",
|
||||
"Kimi K2 Turbo",
|
||||
);
|
||||
if (moonshotTurboAlias) moonshot.push(moonshotTurboAlias);
|
||||
const moonshotThinkingAlias = safeAlias(
|
||||
"moonshot/kimi-k2-thinking",
|
||||
"Kimi K2 Thinking",
|
||||
);
|
||||
if (moonshotThinkingAlias) moonshot.push(moonshotThinkingAlias);
|
||||
const moonshotThinkingTurboAlias = safeAlias(
|
||||
"moonshot/kimi-k2-thinking-turbo",
|
||||
"Kimi K2 Thinking Turbo",
|
||||
);
|
||||
if (moonshotThinkingTurboAlias) moonshot.push(moonshotThinkingTurboAlias);
|
||||
|
||||
return [
|
||||
{
|
||||
@@ -302,7 +344,8 @@ function buildModelPresetPatches(base: Record<string, unknown>): Array<{
|
||||
{
|
||||
id: "moonshot",
|
||||
title: "Kimi (Moonshot)",
|
||||
description: "Adds Moonshot provider config + sets default model to kimi-k2-0905-preview.",
|
||||
description:
|
||||
"Adds Moonshot provider config + sets default model to kimi-k2-0905-preview (includes Kimi K2 turbo/thinking variants).",
|
||||
patches: moonshot,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user