Spaces:
Sleeping
Sleeping
feat: integrate Kimi-K2.6 as the default model and update UI model selection and labeling
Browse filesFiles changed (5)
99 unmodified lines10010110210310410510695 unmodified lines20220320420520620720899 unmodified lines# Define models and languages here to avoid importing Gradio UIAVAILABLE_MODELS = [{"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},{"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},{"name": "Qwen3.5-397B π€", "id": "Qwen/Qwen3.5-397B-A17B", "description": "Qwen3.5-397B-A17B - Latest powerful model via HuggingFace Router", "supports_images": True},{"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},95 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "google/gemma-4-31B-it"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False99 unmodified lines10010110210310410510610795 unmodified lines20320420520620720820999 unmodified lines# Define models and languages here to avoid importing Gradio UIAVAILABLE_MODELS = [{"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},{"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},{"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},{"name": "Qwen3.5-397B π€", "id": "Qwen/Qwen3.5-397B-A17B", "description": "Qwen3.5-397B-A17B - Latest powerful model via HuggingFace Router", "supports_images": True},{"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},95 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "moonshotai/Kimi-K2.6"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False
142 unmodified lines143144145146147148142 unmodified lines# Kimi K2.5 needs Novita providerreturn "moonshotai/Kimi-K2.5:novita"elif model_id == "Qwen/Qwen3-Coder-Next":# Qwen3-Coder-Next needs Novita providerreturn "Qwen/Qwen3-Coder-Next:novita"142 unmodified lines143144145146147148149150151152142 unmodified lines# Kimi K2.5 needs Novita providerreturn "moonshotai/Kimi-K2.5:novita"elif model_id == "moonshotai/Kimi-K2.6":# Kimi K2.6 needs Novita providerreturn "moonshotai/Kimi-K2.6:novita"elif model_id == "Qwen/Qwen3-Coder-Next":# Qwen3-Coder-Next needs Novita providerreturn "Qwen/Qwen3-Coder-Next:novita"
16 unmodified lines1718192021222316 unmodified linesconst [generatedCode, setGeneratedCode] = useState('');const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');const [selectedModel, setSelectedModel] = useState('google/gemma-4-31B-it');const [models, setModels] = useState<Model[]>([]);const [isGenerating, setIsGenerating] = useState(false);const [isAuthenticated, setIsAuthenticated] = useState(false);16 unmodified lines1718192021222316 unmodified linesconst [generatedCode, setGeneratedCode] = useState('');const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');const [selectedModel, setSelectedModel] = useState('moonshotai/Kimi-K2.6');const [models, setModels] = useState<Model[]>([]);const [isGenerating, setIsGenerating] = useState(false);const [isAuthenticated, setIsAuthenticated] = useState(false);
88 unmodified lines89909192939495106 unmodified lines20220320420520620720888 unmodified lines};const formatModelName = (name: string, id: string) => {if (id === 'google/gemma-4-31B-it') return 'Gemma-4-31B β¨';if (id === 'zai-org/GLM-5.1') return 'GLM-5.1 π';if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B π€';return name;106 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-sm text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>{['google/gemma-4-31B-it', 'zai-org/GLM-5.1', 'Qwen/Qwen3.5-397B-A17B', 'MiniMaxAI/MiniMax-M2.5'].includes(model.id) && (<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">NEW</span>88 unmodified lines8990919293949596106 unmodified lines20320420520620720820988 unmodified lines};const formatModelName = (name: string, id: string) => {if (id === 'moonshotai/Kimi-K2.6') return 'Kimi-K2.6 β¨';if (id === 'google/gemma-4-31B-it') return 'Gemma-4-31B π€';if (id === 'zai-org/GLM-5.1') return 'GLM-5.1 π';if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B π€';return name;106 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-sm text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>{['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) && (<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">NEW</span>
30 unmodified lines31323334353637244 unmodified lines282283284285286287288232 unmodified lines52152252352452552652752837 unmodified lines566567568569570571572573267 unmodified lines84184284384484584684730 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'google/gemma-4-31B-it',onAuthChange,setPendingPR,pendingPRRef244 unmodified lines};const formatModelName = (name: string, id: string) => {if (id === 'google/gemma-4-31B-it') return 'Gemma-4-31B β¨';if (id === 'zai-org/GLM-5.1') return 'GLM-5.1 π';if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B π€';return name;232 unmodified linesif (onStart) {// Pass duplicated space ID so auto-deploy updates itconsole.log('[Redesign] Calling onStart with duplicated repo ID:', duplicatedRepoId);console.log('[Redesign] Using google/gemma-4-31B-it for redesign');onStart(redesignPrompt, result.language || 'html', 'google/gemma-4-31B-it', undefined, duplicatedRepoId);}}, 100);37 unmodified linesif (onStart) {console.log('[Redesign] Will create PR - not passing repo ID');console.log('[Redesign] Using google/gemma-4-31B-it for redesign');onStart(redesignPrompt, result.language || 'html', 'google/gemma-4-31B-it', undefined, repoId, true); // Pass true for shouldCreatePR}console.log('[Redesign] Will create PR after code generation completes');267 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-xs font-medium text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>{model.id === 'MiniMaxAI/MiniMax-M2.5' && (<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">NEW</span>30 unmodified lines31323334353637244 unmodified lines282283284285286287288289232 unmodified lines52252352452552652752852937 unmodified lines567568569570571572573574267 unmodified lines84284384484584684784830 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'moonshotai/Kimi-K2.6',onAuthChange,setPendingPR,pendingPRRef244 unmodified lines};const formatModelName = (name: string, id: string) => {if (id === 'moonshotai/Kimi-K2.6') return 'Kimi-K2.6 β¨';if (id === 'google/gemma-4-31B-it') return 'Gemma-4-31B π€';if (id === 'zai-org/GLM-5.1') return 'GLM-5.1 π';if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B π€';return name;232 unmodified linesif (onStart) {// Pass duplicated space ID so auto-deploy updates itconsole.log('[Redesign] Calling onStart with duplicated repo ID:', duplicatedRepoId);console.log('[Redesign] Using moonshotai/Kimi-K2.6 for redesign');onStart(redesignPrompt, result.language || 'html', 'moonshotai/Kimi-K2.6', undefined, duplicatedRepoId);}}, 100);37 unmodified linesif (onStart) {console.log('[Redesign] Will create PR - not passing repo ID');console.log('[Redesign] Using moonshotai/Kimi-K2.6 for redesign');onStart(redesignPrompt, result.language || 'html', 'moonshotai/Kimi-K2.6', undefined, repoId, true); // Pass true for shouldCreatePR}console.log('[Redesign] Will create PR after code generation completes');267 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-xs font-medium text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>{['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) && (<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">NEW</span>
backend_api.py+3-2
backend_models.py+4
frontend/src/app/page.tsx+1-1
frontend/src/components/ControlPanel.tsx+3-2
frontend/src/components/LandingPage.tsx+8-7