From cb05174f19a1be75c125012689d16c49e2b49331 Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Wed, 17 Dec 2025 18:14:02 -0600 Subject: [PATCH 1/6] Add Kimi K2 Thinking model and re-enable brain toggle - Add kimi-k2-thinking to MODEL_CONFIG (256k context, Pro tier) - Set Kimi K2 as reasoning_on model (with thinking) - Keep DeepSeek R1 as reasoning_off model (without thinking) - Re-enable brain toggle button in chat UI Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- frontend/src/components/ModelSelector.tsx | 11 +- frontend/src/components/UnifiedChat.tsx | 132 +++++++++++----------- 2 files changed, 73 insertions(+), 70 deletions(-) diff --git a/frontend/src/components/ModelSelector.tsx b/frontend/src/components/ModelSelector.tsx index 5000eea4..29dfd15f 100644 --- a/frontend/src/components/ModelSelector.tsx +++ b/frontend/src/components/ModelSelector.tsx @@ -68,6 +68,13 @@ export const MODEL_CONFIG: Record = { requiresPro: true, tokenLimit: 130000 }, + "kimi-k2-thinking": { + displayName: "Kimi K2 Thinking", + shortName: "Kimi K2", + badges: ["Pro", "Reasoning", "New"], + requiresPro: true, + tokenLimit: 256000 + }, "gpt-oss-120b": { displayName: "OpenAI GPT-OSS 120B", shortName: "GPT-OSS", @@ -106,8 +113,8 @@ type ModelCategory = "free" | "quick" | "reasoning" | "math" | "image" | "advanc export const CATEGORY_MODELS = { free: "llama-3.3-70b", quick: "gpt-oss-120b", - reasoning_on: "deepseek-r1-0528", // R1 with thinking - reasoning_off: "deepseek-r1-0528", // R1 without thinking (brain toggle temporarily disabled) + reasoning_on: "kimi-k2-thinking", // Kimi K2 with thinking + reasoning_off: "deepseek-r1-0528", // DeepSeek R1 without thinking math: "qwen3-coder-480b", image: "qwen3-vl-30b" // Qwen3-VL for image analysis }; diff --git a/frontend/src/components/UnifiedChat.tsx b/frontend/src/components/UnifiedChat.tsx index f72d8076..2d040f9e 100644 --- a/frontend/src/components/UnifiedChat.tsx +++ b/frontend/src/components/UnifiedChat.tsx @@ -2525,41 +2525,39 @@ export function UnifiedChat() { } /> - {/* Thinking toggle button - temporarily disabled while we remove V3.1 */} - {/* eslint-disable-next-line no-constant-binary-expression */} - {false && - (localState.model === CATEGORY_MODELS.reasoning_on || - localState.model === CATEGORY_MODELS.reasoning_off) && ( - - )} + ? "text-purple-500" + : "text-muted-foreground" + }`} + /> + + )} {/* Web search toggle button - always visible */} - )} + ? "text-purple-500" + : "text-muted-foreground" + }`} + /> + + )} {/* Web search toggle button - always visible */}