add glm-5
Browse filesFiles changed (5)
99 unmodified lines10010110210310410510690 unmodified lines19719819920020120220399 unmodified lines# Define models and languages here to avoid importing Gradio UIAVAILABLE_MODELS = [{"name": "Qwen3-Coder-Next 🤖", "id": "Qwen/Qwen3-Coder-Next", "description": "Qwen3-Coder-Next - Latest powerful coder model via HuggingFace Router with Novita provider (Default)", "supports_images": False},{"name": "Kimi-K2.5 🧠", "id": "moonshotai/Kimi-K2.5", "description": "Kimi-K2.5 - New powerful reasoning model via HuggingFace Router with Novita provider", "supports_images": True},{"name": "GLM-4.7-Flash ⚡", "id": "zai-org/GLM-4.7-Flash", "description": "GLM-4.7-Flash - Ultra-fast GLM model via HuggingFace Router with Novita provider", "supports_images": False},{"name": "GLM-4.7", "id": "zai-org/GLM-4.7", "description": "GLM-4.7 - Latest GLM model via HuggingFace Router with Cerebras provider", "supports_images": False},90 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "Qwen/Qwen3-Coder-Next"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False99 unmodified lines10010110210310410510610790 unmodified lines19819920020120220320499 unmodified lines# Define models and languages here to avoid importing Gradio UIAVAILABLE_MODELS = [{"name": "GLM-5 🧠", "id": "zai-org/GLM-5", "description": "GLM-5 - New powerful reasoning model via HuggingFace Router (Default)", "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},{"name": "Kimi-K2.5 🧠", "id": "moonshotai/Kimi-K2.5", "description": "Kimi-K2.5 - New powerful reasoning model via HuggingFace Router with Novita provider", "supports_images": True},{"name": "GLM-4.7-Flash ⚡", "id": "zai-org/GLM-4.7-Flash", "description": "GLM-4.7-Flash - Ultra-fast GLM model via HuggingFace Router with Novita provider", "supports_images": False},{"name": "GLM-4.7", "id": "zai-org/GLM-4.7", "description": "GLM-4.7 - Latest GLM model via HuggingFace Router with Cerebras provider", "supports_images": False},90 unmodified linesclass CodeGenerationRequest(BaseModel):query: strlanguage: str = "html"model_id: str = "zai-org/GLM-5"provider: str = "auto"history: List[List[str]] = []agent_mode: bool = False
44 unmodified lines4546474849505159 unmodified lines11111211311411511644 unmodified linesdefault_headers={"X-HF-Bill-To": "huggingface"})elif model_id.startswith("zai-org/GLM-4"):# GLM models via HuggingFace Routerreturn OpenAI(base_url="https://router.huggingface.co/v1",59 unmodified lines# GLM-4.7-Flash via HuggingFace Router with Novita providerreturn "zai-org/GLM-4.7-Flash:novita"elif model_id == "moonshotai/Kimi-K2.5":# Kimi K2.5 needs Novita providerreturn "moonshotai/Kimi-K2.5:novita"44 unmodified lines4546474849505159 unmodified lines11111211311411511611711811912044 unmodified linesdefault_headers={"X-HF-Bill-To": "huggingface"})elif model_id.startswith("zai-org/GLM"):# GLM models via HuggingFace Routerreturn OpenAI(base_url="https://router.huggingface.co/v1",59 unmodified lines# GLM-4.7-Flash via HuggingFace Router with Novita providerreturn "zai-org/GLM-4.7-Flash:novita"elif model_id == "zai-org/GLM-5":# 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"
16 unmodified lines1718192021222316 unmodified linesconst [generatedCode, setGeneratedCode] = useState('');const [selectedLanguage, setSelectedLanguage] = useState<Language>('html');const [selectedModel, setSelectedModel] = useState('Qwen/Qwen3-Coder-Next');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');const [models, setModels] = useState<Model[]>([]);const [isGenerating, setIsGenerating] = useState(false);const [isAuthenticated, setIsAuthenticated] = useState(false);
196 unmodified lines197198199200201202203196 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-sm text-[#f5f5f7]">{model.name}</span>{['Qwen/Qwen3-Coder-Next'].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>196 unmodified lines197198199200201202203196 unmodified lines><div className="flex items-center justify-between gap-2"><span className="text-sm text-[#f5f5f7]">{model.name}</span>{['zai-org/GLM-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 lines31323334353637476 unmodified lines51451551651751851952052137 unmodified lines559560561562563564565566267 unmodified lines83483583683783883984030 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'Qwen/Qwen3-Coder-Next',onAuthChange,setPendingPR,pendingPRRef476 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-Coder-Next for redesign');onStart(redesignPrompt, result.language || 'html', 'Qwen/Qwen3-Coder-Next', undefined, duplicatedRepoId);}}, 100);37 unmodified linesif (onStart) {console.log('[Redesign] Will create PR - not passing repo ID');console.log('[Redesign] Using Qwen/Qwen3-Coder-Next for redesign');onStart(redesignPrompt, result.language || 'html', 'Qwen/Qwen3-Coder-Next', 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]">{model.name}</span>{model.id === 'Qwen/Qwen3-Coder-Next' && (<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 lines31323334353637476 unmodified lines51451551651751851952052137 unmodified lines559560561562563564565566267 unmodified lines83483583683783883984030 unmodified linesonImport,isAuthenticated,initialLanguage = 'html',initialModel = 'zai-org/GLM-5',onAuthChange,setPendingPR,pendingPRRef476 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 for redesign');onStart(redesignPrompt, result.language || 'html', 'zai-org/GLM-5', 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 for redesign');onStart(redesignPrompt, result.language || 'html', 'zai-org/GLM-5', 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]">{model.name}</span>{model.id === 'zai-org/GLM-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>
backend_api.py+3-2
backend_models.py+5-1
frontend/src/app/page.tsx+1-1
frontend/src/components/ControlPanel.tsx+1-1
frontend/src/components/LandingPage.tsx+6-6