Spaces:
Sleeping
Sleeping
feat: update default model to GLM-5.1 across backend and frontend configurations
Browse filesFiles changed (5)
99 unmodified lines10010110210310410510693 unmodified lines20020120220320420520699 unmodified lines# Define models and languages here to avoid importing Gradio UIAVAILABLE_MODELS = [{"name": "Qwen3.5-397B π€", "id": "Qwen/Qwen3.5-397B-A17B", "description": "Qwen3.5-397B-A17B - Latest powerful model via HuggingFace Router (Default)", "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},{"name": "GLM-5 π§ ", "id": "zai-org/GLM-5", "description": "GLM-5 - New powerful reasoning model via HuggingFace Router", "supports_images": False},{"name": "Qwen3-Coder-Next π€", "id": "Qwen/Qwen3-Coder-Next", "description": "Qwen3-Coder-Next - Latest powerful coder model via HuggingFace Router with Novita provider", "supports_images": False},93 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "Qwen/Qwen3.5-397B-A17B"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False99 unmodified lines10010110210310410510610793 unmodified lines20120220320420520620799 unmodified lines# Define models and languages here to avoid importing Gradio UIAVAILABLE_MODELS = [{"name": "GLM-5.1 π", "id": "zai-org/GLM-5.1", "description": "GLM-5.1 - Latest powerful model via HuggingFace Router with Novita provider (Default)", "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},{"name": "GLM-5 π§ ", "id": "zai-org/GLM-5", "description": "GLM-5 - New powerful reasoning model via HuggingFace Router", "supports_images": False},{"name": "Qwen3-Coder-Next π€", "id": "Qwen/Qwen3-Coder-Next", "description": "Qwen3-Coder-Next - Latest powerful coder model via HuggingFace Router with Novita provider", "supports_images": False},93 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "zai-org/GLM-5.1"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False
126 unmodified lines127128129130131132126 unmodified lines# GLM-5 via HuggingFace Router with Novita providerreturn "zai-org/GLM-5:novita"elif model_id == "moonshotai/Kimi-K2.5":# Kimi K2.5 needs Novita providerreturn "moonshotai/Kimi-K2.5:novita"126 unmodified lines127128129130131132133134135136126 unmodified lines# GLM-5 via HuggingFace Router with Novita providerreturn "zai-org/GLM-5:novita"elif model_id == "zai-org/GLM-5.1":# GLM-5.1 via HuggingFace Router with Novita providerreturn "zai-org/GLM-5.1:novita"elif model_id == "moonshotai/Kimi-K2.5":# Kimi K2.5 needs Novita providerreturn "moonshotai/Kimi-K2.5:novita"
16 unmodified lines1718192021222316 unmodified linesconst [generatedCode, setGeneratedCode] = useState('');const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');const [selectedModel, setSelectedModel] = useState('Qwen/Qwen3.5-397B-A17B');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('zai-org/GLM-5.1');const [models, setModels] = useState<Model[]>([]);const [isGenerating, setIsGenerating] = useState(false);const [isAuthenticated, setIsAuthenticated] = useState(false);
88 unmodified lines899091929394105 unmodified lines20020120220320420520688 unmodified lines};const formatModelName = (name: string, id: string) => {if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B π€';return name;};105 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-sm text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>{['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 lines89909192939495105 unmodified lines20120220320420520620788 unmodified lines};const formatModelName = (name: string, id: string) => {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;};105 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-sm text-[#f5f5f7]">{formatModelName(model.name, model.id)}</span>{['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 lines282283284285286287231 unmodified lines51952052152252352452552637 unmodified lines56456556656756856957057130 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'Qwen/Qwen3.5-397B-A17B',onAuthChange,setPendingPR,pendingPRRef244 unmodified lines};const formatModelName = (name: string, id: string) => {if (id === 'Qwen/Qwen3.5-397B-A17B') return 'Qwen3.5-397B-A17B π€';return name;};231 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 Qwen/Qwen3.5-397B-A17B for redesign');onStart(redesignPrompt, result.language || 'html', 'Qwen/Qwen3.5-397B-A17B', undefined, duplicatedRepoId);}}, 100);37 unmodified linesif (onStart) {console.log('[Redesign] Will create PR - not passing repo ID');console.log('[Redesign] Using Qwen/Qwen3.5-397B-A17B for redesign');onStart(redesignPrompt, result.language || 'html', 'Qwen/Qwen3.5-397B-A17B', undefined, repoId, true); // Pass true for shouldCreatePR}console.log('[Redesign] Will create PR after code generation completes');30 unmodified lines31323334353637244 unmodified lines282283284285286287288231 unmodified lines52052152252352452552652737 unmodified lines56556656756856957057157230 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'zai-org/GLM-5.1',onAuthChange,setPendingPR,pendingPRRef244 unmodified lines};const formatModelName = (name: string, id: string) => {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;};231 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 zai-org/GLM-5.1 for redesign');onStart(redesignPrompt, result.language || 'html', 'zai-org/GLM-5.1', undefined, duplicatedRepoId);}}, 100);37 unmodified linesif (onStart) {console.log('[Redesign] Will create PR - not passing repo ID');console.log('[Redesign] Using zai-org/GLM-5.1 for redesign');onStart(redesignPrompt, result.language || 'html', 'zai-org/GLM-5.1', undefined, repoId, true); // Pass true for shouldCreatePR}console.log('[Redesign] Will create PR after code generation completes');
backend_api.py+3-2
backend_models.py+4
frontend/src/app/page.tsx+1-1
frontend/src/components/ControlPanel.tsx+2-1
frontend/src/components/LandingPage.tsx+6-5