akhaliq HF Staff commited on
Commit
289db77
Β·
1 Parent(s): adeffef

feat: integrate Kimi-K2.6 as the default model and update UI model selection and labeling

Browse files
backend_api.py CHANGED
@@ -100,7 +100,8 @@ def get_cached_client(model_id: str, provider: str = "auto"):
100
 
101
  # Define models and languages here to avoid importing Gradio UI
102
  AVAILABLE_MODELS = [
103
- {"name": "Gemma-4-31B ✨", "id": "google/gemma-4-31B-it", "description": "Gemma-4-31B-it - Latest powerful model via HuggingFace Router with fastest provider (Default)", "supports_images": True},
 
104
  {"name": "GLM-5.1 πŸš€", "id": "zai-org/GLM-5.1", "description": "GLM-5.1 - Powerful model via HuggingFace Router with Novita provider", "supports_images": False},
105
  {"name": "Qwen3.5-397B πŸ€–", "id": "Qwen/Qwen3.5-397B-A17B", "description": "Qwen3.5-397B-A17B - Latest powerful model via HuggingFace Router", "supports_images": True},
106
  {"name": "MiniMax-M2.5 πŸ€–", "id": "MiniMaxAI/MiniMax-M2.5", "description": "MiniMax-M2.5 - Latest powerful coder model via HuggingFace Router with fastest provider", "supports_images": False},
@@ -202,7 +203,7 @@ async def startup_event():
202
  class CodeGenerationRequest(BaseModel):
203
  query: str
204
  language: str = "html"
205
- model_id: str = "google/gemma-4-31B-it"
206
  provider: str = "auto"
207
  history: List[List[str]] = []
208
  agent_mode: bool = False
 
100
 
101
  # Define models and languages here to avoid importing Gradio UI
102
  AVAILABLE_MODELS = [
103
+ {"name": "Kimi-K2.6 ✨", "id": "moonshotai/Kimi-K2.6", "description": "Kimi-K2.6 - Latest powerful model via HuggingFace Router with Novita provider (Default)", "supports_images": True},
104
+ {"name": "Gemma-4-31B πŸ€–", "id": "google/gemma-4-31B-it", "description": "Gemma-4-31B-it - Powerful model via HuggingFace Router with fastest provider", "supports_images": True},
105
  {"name": "GLM-5.1 πŸš€", "id": "zai-org/GLM-5.1", "description": "GLM-5.1 - Powerful model via HuggingFace Router with Novita provider", "supports_images": False},
106
  {"name": "Qwen3.5-397B πŸ€–", "id": "Qwen/Qwen3.5-397B-A17B", "description": "Qwen3.5-397B-A17B - Latest powerful model via HuggingFace Router", "supports_images": True},
107
  {"name": "MiniMax-M2.5 πŸ€–", "id": "MiniMaxAI/MiniMax-M2.5", "description": "MiniMax-M2.5 - Latest powerful coder model via HuggingFace Router with fastest provider", "supports_images": False},
 
203
  class CodeGenerationRequest(BaseModel):
204
  query: str
205
  language: str = "html"
206
+ model_id: str = "moonshotai/Kimi-K2.6"
207
  provider: str = "auto"
208
  history: List[List[str]] = []
209
  agent_mode: bool = False
backend_models.py CHANGED
@@ -143,6 +143,10 @@ def get_real_model_id(model_id: str) -> str:
143
  # Kimi K2.5 needs Novita provider
144
  return "moonshotai/Kimi-K2.5:novita"
145
 
 
 
 
 
146
  elif model_id == "Qwen/Qwen3-Coder-Next":
147
  # Qwen3-Coder-Next needs Novita provider
148
  return "Qwen/Qwen3-Coder-Next:novita"
 
143
  # Kimi K2.5 needs Novita provider
144
  return "moonshotai/Kimi-K2.5:novita"
145
 
146
+ elif model_id == "moonshotai/Kimi-K2.6":
147
+ # Kimi K2.6 needs Novita provider
148
+ return "moonshotai/Kimi-K2.6:novita"
149
+
150
  elif model_id == "Qwen/Qwen3-Coder-Next":
151
  # Qwen3-Coder-Next needs Novita provider
152
  return "Qwen/Qwen3-Coder-Next:novita"
frontend/src/app/page.tsx CHANGED
@@ -17,7 +17,7 @@ export default function Home() {
17
 
18
  const [generatedCode, setGeneratedCode] = useState('');
19
  const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');
20
- const [selectedModel, setSelectedModel] = useState('google/gemma-4-31B-it');
21
  const [models, setModels] = useState<Model[]>([]);
22
  const [isGenerating, setIsGenerating] = useState(false);
23
  const [isAuthenticated, setIsAuthenticated] = useState(false);
 
17
 
18
  const [generatedCode, setGeneratedCode] = useState('');
19
  const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');
20
+ const [selectedModel, setSelectedModel] = useState('moonshotai/Kimi-K2.6');
21
  const [models, setModels] = useState<Model[]>([]);
22
  const [isGenerating, setIsGenerating] = useState(false);
23
  const [isAuthenticated, setIsAuthenticated] = useState(false);
frontend/src/components/ControlPanel.tsx CHANGED
@@ -89,7 +89,8 @@ export default function ControlPanel({
89
  };
90
 
91
  const formatModelName = (name: string, id: string) => {
92
- if (id === 'google/gemma-4-31B-it') return 'Gemma-4-31B ✨';
 
93
  if (id === 'zai-org/GLM-5.1') return 'GLM-5.1 πŸš€';
94
  if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B πŸ€–';
95
  return name;
@@ -202,7 +203,7 @@ export default function ControlPanel({
202
  >
203
  <div className="flex items-center justify-between gap-2">
204
  <span className="text-sm text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>
205
- {['google/gemma-4-31B-it', 'zai-org/GLM-5.1', 'Qwen/Qwen3.5-397B-A17B', 'MiniMaxAI/MiniMax-M2.5'].includes(model.id) && (
206
  <span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase flex-shrink-0">
207
  NEW
208
  </span>
 
89
  };
90
 
91
  const formatModelName = (name: string, id: string) => {
92
+ if (id === 'moonshotai/Kimi-K2.6') return 'Kimi-K2.6 ✨';
93
+ if (id === 'google/gemma-4-31B-it') return 'Gemma-4-31B πŸ€–';
94
  if (id === 'zai-org/GLM-5.1') return 'GLM-5.1 πŸš€';
95
  if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B πŸ€–';
96
  return name;
 
203
  >
204
  <div className="flex items-center justify-between gap-2">
205
  <span className="text-sm text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>
206
+ {['moonshotai/Kimi-K2.6', 'google/gemma-4-31B-it', 'zai-org/GLM-5.1', 'Qwen/Qwen3.5-397B-A17B', 'MiniMaxAI/MiniMax-M2.5'].includes(model.id) && (
207
  <span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase flex-shrink-0">
208
  NEW
209
  </span>
frontend/src/components/LandingPage.tsx CHANGED
@@ -31,7 +31,7 @@ export default function LandingPage({
31
  onImport,
32
  isAuthenticated,
33
  initialLanguage = 'html',
34
- initialModel = 'google/gemma-4-31B-it',
35
  onAuthChange,
36
  setPendingPR,
37
  pendingPRRef
@@ -282,7 +282,8 @@ export default function LandingPage({
282
  };
283
 
284
  const formatModelName = (name: string, id: string) => {
285
- if (id === 'google/gemma-4-31B-it') return 'Gemma-4-31B ✨';
 
286
  if (id === 'zai-org/GLM-5.1') return 'GLM-5.1 πŸš€';
287
  if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B πŸ€–';
288
  return name;
@@ -521,8 +522,8 @@ ${isGradio ? '\n\nIMPORTANT: Only output app.py with the redesigned UI (themes,
521
  if (onStart) {
522
  // Pass duplicated space ID so auto-deploy updates it
523
  console.log('[Redesign] Calling onStart with duplicated repo ID:', duplicatedRepoId);
524
- console.log('[Redesign] Using google/gemma-4-31B-it for redesign');
525
- onStart(redesignPrompt, result.language || 'html', 'google/gemma-4-31B-it', undefined, duplicatedRepoId);
526
  }
527
  }, 100);
528
 
@@ -566,8 +567,8 @@ Note: After generating the redesign, I will create a Pull Request on the origina
566
 
567
  if (onStart) {
568
  console.log('[Redesign] Will create PR - not passing repo ID');
569
- console.log('[Redesign] Using google/gemma-4-31B-it for redesign');
570
- onStart(redesignPrompt, result.language || 'html', 'google/gemma-4-31B-it', undefined, repoId, true); // Pass true for shouldCreatePR
571
  }
572
 
573
  console.log('[Redesign] Will create PR after code generation completes');
@@ -841,7 +842,7 @@ Note: After generating the redesign, I will create a Pull Request on the origina
841
  >
842
  <div className="flex items-center justify-between gap-2">
843
  <span className="text-xs font-medium text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>
844
- {model.id === 'MiniMaxAI/MiniMax-M2.5' && (
845
  <span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase">
846
  NEW
847
  </span>
 
31
  onImport,
32
  isAuthenticated,
33
  initialLanguage = 'html',
34
+ initialModel = 'moonshotai/Kimi-K2.6',
35
  onAuthChange,
36
  setPendingPR,
37
  pendingPRRef
 
282
  };
283
 
284
  const formatModelName = (name: string, id: string) => {
285
+ if (id === 'moonshotai/Kimi-K2.6') return 'Kimi-K2.6 ✨';
286
+ if (id === 'google/gemma-4-31B-it') return 'Gemma-4-31B πŸ€–';
287
  if (id === 'zai-org/GLM-5.1') return 'GLM-5.1 πŸš€';
288
  if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B πŸ€–';
289
  return name;
 
522
  if (onStart) {
523
  // Pass duplicated space ID so auto-deploy updates it
524
  console.log('[Redesign] Calling onStart with duplicated repo ID:', duplicatedRepoId);
525
+ console.log('[Redesign] Using moonshotai/Kimi-K2.6 for redesign');
526
+ onStart(redesignPrompt, result.language || 'html', 'moonshotai/Kimi-K2.6', undefined, duplicatedRepoId);
527
  }
528
  }, 100);
529
 
 
567
 
568
  if (onStart) {
569
  console.log('[Redesign] Will create PR - not passing repo ID');
570
+ console.log('[Redesign] Using moonshotai/Kimi-K2.6 for redesign');
571
+ onStart(redesignPrompt, result.language || 'html', 'moonshotai/Kimi-K2.6', undefined, repoId, true); // Pass true for shouldCreatePR
572
  }
573
 
574
  console.log('[Redesign] Will create PR after code generation completes');
 
842
  >
843
  <div className="flex items-center justify-between gap-2">
844
  <span className="text-xs font-medium text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>
845
+ {['moonshotai/Kimi-K2.6', 'google/gemma-4-31B-it', 'zai-org/GLM-5.1', 'Qwen/Qwen3.5-397B-A17B', 'MiniMaxAI/MiniMax-M2.5'].includes(model.id) && (
846
  <span className="px-1.5 py-0.5 bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[9px] font-bold rounded uppercase">
847
  NEW
848
  </span>