akhaliq HF Staff commited on
Commit
978f99a
ยท
1 Parent(s): db8d4ce

update default model

Browse files
backend_api.py CHANGED
@@ -99,11 +99,12 @@ def get_cached_client(model_id: str, provider: str = "auto"):
99
 
100
  # Define models and languages here to avoid importing Gradio UI
101
  AVAILABLE_MODELS = [
 
102
  {"name": "Devstral Medium 2512", "id": "devstral-medium-2512", "description": "Mistral Devstral 2512 - Expert code generation model via OpenRouter", "supports_images": False},
103
  {"name": "GLM-4.6V ๐Ÿ‘๏ธ", "id": "zai-org/GLM-4.6V:zai-org", "description": "GLM-4.6V vision model - supports image uploads for visual understanding", "supports_images": True},
104
  {"name": "DeepSeek V3.2", "id": "deepseek-ai/DeepSeek-V3.2-Exp", "description": "DeepSeek V3.2 Experimental - Fast model for code generation via HuggingFace Router with Novita provider", "supports_images": False},
105
  {"name": "DeepSeek R1", "id": "deepseek-ai/DeepSeek-R1-0528", "description": "DeepSeek R1 model for code generation", "supports_images": False},
106
- {"name": "Gemini 3.0 Flash Preview", "id": "gemini-3-flash-preview", "description": "Google Gemini 3.0 Flash Preview with Thinking Mode (High) (Default)", "supports_images": False},
107
  {"name": "Gemini 3.0 Pro", "id": "gemini-3.0-pro", "description": "Google Gemini 3.0 Pro via Poe with advanced reasoning", "supports_images": False},
108
  {"name": "Grok 4.1 Fast", "id": "x-ai/grok-4.1-fast", "description": "Grok 4.1 Fast model via OpenRouter (20 req/min on free tier)", "supports_images": False},
109
  {"name": "MiniMax M2", "id": "MiniMaxAI/MiniMax-M2", "description": "MiniMax M2 model via HuggingFace InferenceClient with Novita provider", "supports_images": False},
@@ -201,7 +202,7 @@ async def startup_event():
201
  class CodeGenerationRequest(BaseModel):
202
  query: str
203
  language: str = "html"
204
- model_id: str = "gemini-3-flash-preview"
205
  provider: str = "auto"
206
  history: List[List[str]] = []
207
  agent_mode: bool = False
 
99
 
100
  # Define models and languages here to avoid importing Gradio UI
101
  AVAILABLE_MODELS = [
102
+ {"name": "GLM-4.6", "id": "zai-org/GLM-4.6", "description": "GLM-4.6 model via HuggingFace with Cerebras provider (Default)", "supports_images": False},
103
  {"name": "Devstral Medium 2512", "id": "devstral-medium-2512", "description": "Mistral Devstral 2512 - Expert code generation model via OpenRouter", "supports_images": False},
104
  {"name": "GLM-4.6V ๐Ÿ‘๏ธ", "id": "zai-org/GLM-4.6V:zai-org", "description": "GLM-4.6V vision model - supports image uploads for visual understanding", "supports_images": True},
105
  {"name": "DeepSeek V3.2", "id": "deepseek-ai/DeepSeek-V3.2-Exp", "description": "DeepSeek V3.2 Experimental - Fast model for code generation via HuggingFace Router with Novita provider", "supports_images": False},
106
  {"name": "DeepSeek R1", "id": "deepseek-ai/DeepSeek-R1-0528", "description": "DeepSeek R1 model for code generation", "supports_images": False},
107
+ {"name": "Gemini 3.0 Flash Preview", "id": "gemini-3-flash-preview", "description": "Google Gemini 3.0 Flash Preview with Thinking Mode (High)", "supports_images": False},
108
  {"name": "Gemini 3.0 Pro", "id": "gemini-3.0-pro", "description": "Google Gemini 3.0 Pro via Poe with advanced reasoning", "supports_images": False},
109
  {"name": "Grok 4.1 Fast", "id": "x-ai/grok-4.1-fast", "description": "Grok 4.1 Fast model via OpenRouter (20 req/min on free tier)", "supports_images": False},
110
  {"name": "MiniMax M2", "id": "MiniMaxAI/MiniMax-M2", "description": "MiniMax M2 model via HuggingFace InferenceClient with Novita provider", "supports_images": False},
 
202
  class CodeGenerationRequest(BaseModel):
203
  query: str
204
  language: str = "html"
205
+ model_id: str = "zai-org/GLM-4.6"
206
  provider: str = "auto"
207
  history: List[List[str]] = []
208
  agent_mode: bool = False
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('gemini-3-flash-preview');
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('zai-org/GLM-4.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
@@ -196,7 +196,7 @@ export default function ControlPanel({
196
  >
197
  <div className="flex items-center justify-between gap-2">
198
  <span className="text-sm text-[#f5f5f7]">{model.name}</span>
199
- {model.id === 'gemini-3-flash-preview' && (
200
  <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">
201
  NEW
202
  </span>
 
196
  >
197
  <div className="flex items-center justify-between gap-2">
198
  <span className="text-sm text-[#f5f5f7]">{model.name}</span>
199
+ {model.id === 'zai-org/GLM-4.6' && (
200
  <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">
201
  NEW
202
  </span>
frontend/src/components/LandingPage.tsx CHANGED
@@ -31,7 +31,7 @@ export default function LandingPage({
31
  onImport,
32
  isAuthenticated,
33
  initialLanguage = 'html',
34
- initialModel = 'gemini-3-flash-preview',
35
  onAuthChange,
36
  setPendingPR,
37
  pendingPRRef
@@ -833,7 +833,7 @@ Note: After generating the redesign, I will create a Pull Request on the origina
833
  >
834
  <div className="flex items-center justify-between gap-2">
835
  <span className="text-xs font-medium text-[#f5f5f7]">{model.name}</span>
836
- {model.id === 'gemini-3-flash-preview' && (
837
  <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">
838
  NEW
839
  </span>
 
31
  onImport,
32
  isAuthenticated,
33
  initialLanguage = 'html',
34
+ initialModel = 'zai-org/GLM-4.6',
35
  onAuthChange,
36
  setPendingPR,
37
  pendingPRRef
 
833
  >
834
  <div className="flex items-center justify-between gap-2">
835
  <span className="text-xs font-medium text-[#f5f5f7]">{model.name}</span>
836
+ {model.id === 'zai-org/GLM-4.6' && (
837
  <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">
838
  NEW
839
  </span>