feat: add Kimi K2 variants to Moonshot preset

This commit is contained in:
Mickaël Ahouansou
2026-01-13 03:05:02 +01:00
committed by Peter Steinberger
parent 542c8020ec
commit abe9440096
4 changed files with 109 additions and 2 deletions

View File

@@ -75,9 +75,34 @@
## Agent-Specific Notes
- Vocabulary: "makeup" = "mac app".
- When answering questions, respond with high-confidence answers only: verify in code; do not guess.
- Web: allowed by default for read/search when it adds net value; no external actions/posts without explicit OK.
- **Exécution (anti-friction)**
- Si Mike donne une intention claire de lecture/recherche (ex: “remonte son fil”, “retrouve ce tweet”) : jessaie immédiatement les meilleurs outils disponibles (ex: `bird`) sans redemander dOK.
- Je ne reviens avec une question pivot que si 2 tentatives raisonnables échouent (ex: accès public → `bird`).
- Publier/DM/agir “au nom de” reste toujours `Besoin dOK`.
- Model switch commands (copy/paste):
- Turbo: `/model moonshot/kimi-k2-turbo-preview`
- Thinking: `/model moonshot/kimi-k2-thinking`
- Thinking Turbo: `/model moonshot/kimi-k2-thinking-turbo`
- GPT-5.2: `/model openai-codex/gpt-5.2`
- Never update the Carbon dependency.
- CLI progress: use `src/cli/progress.ts` (`osc-progress` + `@clack/prompts` spinner); dont hand-roll spinners/bars.
- Status output: keep tables + ANSI-safe wrapping (`src/terminal/table.ts`); `status --all` = read-only/pasteable, `status --deep` = probes.
### ÉLYSIA (Obsidian vault) reminders
- Applies when the request concerns the ÉLYSIA vault (`/mnt/f/OBSIDIAN/ÉLYSIA`) or Obsidian MCP.
- Never write/edit/move/delete without Mikes explicit OK (includes any tool/command with write effects).
- Prefer Obsidian MCP via `mcporter` (available):
- Read/search notes: `mcporter call obsidian-mcp-server-stdio.<tool> ...`
- Tasks queries: `mcporter call obsidian-tasks.query_tasks ...`
- Do not use Obsidian MCP on `.codex/**`; use filesystem reads instead.
- Obsidian formatting: do not add an H1 (`# ...`) inside note bodies.
- Frontmatter dates: do not create/modify `création` / `modification`.
- Keep technical artifacts (scripts, exports, prototypes) out of the vault by default; use `/mnt/e/Mes Vibes Programmes/`.
### Tonality (Feu / Danse / Jardin)
- If Mike explicitly invokes Feu/Danse/Jardin: adapt style immediately.
- Otherwise: pick the mode that best serves the intent; dont recite the framework.
- Gateway currently runs only as the menubar app; there is no separate LaunchAgent/helper label installed. Restart via the Clawdbot Mac app or `scripts/restart-mac.sh`; to verify/kill use `launchctl print gui/$UID | grep clawdbot` rather than assuming a fixed label. **When debugging on macOS, start/stop the gateway via the app, not ad-hoc tmux sessions; kill any temporary tunnels before handoff.**
- macOS logs: use `./scripts/clawlog.sh` (aka `vtlog`) to query unified logs for the Clawdbot subsystem; it supports follow/tail/category filters and expects passwordless sudo for `/usr/bin/log`.
- If shared guardrails are available locally, review them; otherwise follow this repo's guidance.

View File

@@ -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

View File

@@ -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.

View File

@@ -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,
},
];