From abe94400965393e30b8eab2399dcb9df184cb212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Ahouansou?= Date: Tue, 13 Jan 2026 03:05:02 +0100 Subject: [PATCH 1/2] feat: add Kimi K2 variants to Moonshot preset --- AGENTS.md | 25 ++++++++++++++++++ docs/concepts/model-providers.md | 2 ++ docs/providers/moonshot.md | 39 ++++++++++++++++++++++++++- ui/src/ui/views/config.ts | 45 +++++++++++++++++++++++++++++++- 4 files changed, 109 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3fcf5c00c..745d45f14 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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”) : j’essaie immédiatement les meilleurs outils disponibles (ex: `bird`) sans redemander d’OK. + - 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 d’OK`. +- 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); don’t 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 Mike’s explicit OK (includes any tool/command with write effects). +- Prefer Obsidian MCP via `mcporter` (available): + - Read/search notes: `mcporter call obsidian-mcp-server-stdio. ...` + - 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; don’t 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. diff --git a/docs/concepts/model-providers.md b/docs/concepts/model-providers.md index 9ed6b713a..a98526f88 100644 --- a/docs/concepts/model-providers.md +++ b/docs/concepts/model-providers.md @@ -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 diff --git a/docs/providers/moonshot.md b/docs/providers/moonshot.md index 3bbed23d1..02d7b0437 100644 --- a/docs/providers/moonshot.md +++ b/docs/providers/moonshot.md @@ -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/`. - 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. diff --git a/ui/src/ui/views/config.ts b/ui/src/ui/views/config.ts index 454942697..2fd753798 100644 --- a/ui/src/ui/views/config.ts +++ b/ui/src/ui/views/config.ts @@ -278,12 +278,54 @@ function buildModelPresetPatches(base: Record): 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): 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, }, ]; From 99a6fcf3f76c31ae231c4cb9e56c82f88968f9c2 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 13 Jan 2026 02:32:29 +0000 Subject: [PATCH 2/2] fix: add Kimi K2 variants to Moonshot preset (#818) (thanks @mickahouan) --- AGENTS.md | 25 ------------------------- CHANGELOG.md | 3 +++ 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 745d45f14..3fcf5c00c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -75,34 +75,9 @@ ## 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”) : j’essaie immédiatement les meilleurs outils disponibles (ex: `bird`) sans redemander d’OK. - - 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 d’OK`. -- 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); don’t 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 Mike’s explicit OK (includes any tool/command with write effects). -- Prefer Obsidian MCP via `mcporter` (available): - - Read/search notes: `mcporter call obsidian-mcp-server-stdio. ...` - - 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; don’t 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. diff --git a/CHANGELOG.md b/CHANGELOG.md index 3267a86be..dad7a883c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)