Ducdata1808 commited on
Commit
f465e6d
·
1 Parent(s): c33957e

chore: remove invalid model IDs and update OpenRouter default to qwen-2.5-coder-32b-instruct

Browse files
frontend/index.html CHANGED
@@ -517,27 +517,23 @@
517
  <optgroup label="Groq Cloud API (High-speed Free Tier)">
518
  <option value="llama-3.3-70b-versatile">Llama 3.3 70B (Groq - High Speed)</option>
519
  <option value="llama-3.1-8b-instant">Llama 3.1 8B (Groq - Ultra Speed)</option>
520
- <option value="openai/gpt-oss-20b">GPT-OSS 20B (Groq - Experimental)</option>
521
  </optgroup>
522
  <optgroup label="Google Gemini (Studio API)">
523
  <option value="gemini-2.5-flash">Gemini 2.5 Flash</option>
524
  <option value="gemini-2.5-flash-thinking-exp">Gemini 2.5 Flash Thinking</option>
525
  <option value="gemini-2.5-pro">Gemini 2.5 Pro</option>
526
  </optgroup>
527
- <optgroup label="OpenRouter (Free Models - Recommended)">
528
  <option value="meta-llama/llama-3.3-70b-instruct:free">Llama 3.3 70B Free (Large)</option>
529
- <option value="qwen/qwen3-coder:free">Qwen3 Coder Free (Code-tuned)</option>
530
  <option value="meta-llama/llama-3.2-3b-instruct:free">Llama 3.2 3B Free (Tiny)</option>
531
- <option value="cohere/north-mini-code:free">Cohere North Code Free (Medium)</option>
532
  </optgroup>
533
  <optgroup label="Hugging Face Serverless (Free Open-Source)">
534
  <!-- Large Models -->
535
- <option value="deepseek-ai/DeepSeek-R1-Distill-Qwen-32B">DeepSeek R1 Qwen 32B (Reasoning)</option>
536
  <option value="Qwen/Qwen2.5-Coder-32B-Instruct">Qwen 2.5 Coder 32B (Large Coder)</option>
537
  <option value="meta-llama/Llama-3.3-70B-Instruct">Llama 3.3 70B (General)</option>
538
  <!-- Small Models -->
539
  <option value="Qwen/Qwen2.5-Coder-7B-Instruct">Qwen 2.5 Coder 7B (Medium Coder)</option>
540
- <option value="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B">DeepSeek R1 Qwen 1.5B (Tiny Reasoning)</option>
541
  <option value="Qwen/Qwen2.5-Coder-1.5B-Instruct">Qwen 2.5 Coder 1.5B (Tiny Coder)</option>
542
  </optgroup>
543
  </select>
 
517
  <optgroup label="Groq Cloud API (High-speed Free Tier)">
518
  <option value="llama-3.3-70b-versatile">Llama 3.3 70B (Groq - High Speed)</option>
519
  <option value="llama-3.1-8b-instant">Llama 3.1 8B (Groq - Ultra Speed)</option>
 
520
  </optgroup>
521
  <optgroup label="Google Gemini (Studio API)">
522
  <option value="gemini-2.5-flash">Gemini 2.5 Flash</option>
523
  <option value="gemini-2.5-flash-thinking-exp">Gemini 2.5 Flash Thinking</option>
524
  <option value="gemini-2.5-pro">Gemini 2.5 Pro</option>
525
  </optgroup>
526
+ <optgroup label="OpenRouter (Recommended)">
527
  <option value="meta-llama/llama-3.3-70b-instruct:free">Llama 3.3 70B Free (Large)</option>
 
528
  <option value="meta-llama/llama-3.2-3b-instruct:free">Llama 3.2 3B Free (Tiny)</option>
529
+ <option value="qwen/qwen-2.5-coder-32b-instruct">Qwen 2.5 Coder 32B (OpenRouter - Paid)</option>
530
  </optgroup>
531
  <optgroup label="Hugging Face Serverless (Free Open-Source)">
532
  <!-- Large Models -->
 
533
  <option value="Qwen/Qwen2.5-Coder-32B-Instruct">Qwen 2.5 Coder 32B (Large Coder)</option>
534
  <option value="meta-llama/Llama-3.3-70B-Instruct">Llama 3.3 70B (General)</option>
535
  <!-- Small Models -->
536
  <option value="Qwen/Qwen2.5-Coder-7B-Instruct">Qwen 2.5 Coder 7B (Medium Coder)</option>
 
537
  <option value="Qwen/Qwen2.5-Coder-1.5B-Instruct">Qwen 2.5 Coder 1.5B (Tiny Coder)</option>
538
  </optgroup>
539
  </select>
models/openrouter_adapter.py CHANGED
@@ -8,7 +8,7 @@ from models.base_adapter import BaseModelAdapter, ModelResponse
8
  class OpenRouterModelAdapter(BaseModelAdapter):
9
  """Adapter cho các LLMs chạy qua OpenRouter API (hỗ trợ các model miễn phí)"""
10
 
11
- def __init__(self, api_key: Optional[str] = None, model_name: str = "qwen/qwen-2.5-coder-32b:free"):
12
  # Nạp API key từ môi trường nếu không truyền vào
13
  if not api_key:
14
  from dotenv import load_dotenv
 
8
  class OpenRouterModelAdapter(BaseModelAdapter):
9
  """Adapter cho các LLMs chạy qua OpenRouter API (hỗ trợ các model miễn phí)"""
10
 
11
+ def __init__(self, api_key: Optional[str] = None, model_name: str = "qwen/qwen-2.5-coder-32b-instruct"):
12
  # Nạp API key từ môi trường nếu không truyền vào
13
  if not api_key:
14
  from dotenv import load_dotenv