bep40 commited on
Commit
308b5f5
·
verified ·
1 Parent(s): 88430b6

Update patch_models.py with correct HF Inference model IDs

Browse files
Files changed (1) hide show
  1. patch_models.py +8 -6
patch_models.py CHANGED
@@ -8,16 +8,18 @@ with open(AGENT_FILE, "r") as f:
8
  # Add new models to AVAILABLE_MODELS
9
  target = "AVAILABLE_MODELS = _available_models()\n"
10
  patch = '''
11
- # === PATCH: Add OpenRouter + HF Inference models ===
12
  import os as _os
13
  AVAILABLE_MODELS.extend([
14
- {"id": "openai/deepseek/deepseek-chat-v3-0324", "label": "DeepSeek V3", "provider": "openrouter", "tier": "free", "recommended": True},
 
 
 
15
  {"id": "openai/google/gemini-2.0-flash-001", "label": "Gemini 2.0 Flash", "provider": "openrouter", "tier": "free"},
16
- {"id": "openai/qwen/qwen3-30b-a3b", "label": "Qwen3 30B", "provider": "openrouter", "tier": "free"},
17
- {"id": "Qwen/Qwen3-235B-A22B", "label": "Qwen3 235B", "provider": "huggingface", "tier": "free"},
18
  ])
19
  PREMIUM_MODEL_IDS = set() # No premium gate
20
- DEFAULT_FREE_MODEL_ID = "openai/deepseek/deepseek-chat-v3-0324"
21
  # === END PATCH ===
22
  '''
23
 
@@ -27,7 +29,7 @@ if target in content:
27
 
28
  # Fix title generation
29
  old_title = 'model="openai/openai/gpt-oss-120b:cerebras",\n api_base="https://router.huggingface.co/v1",\n api_key=api_key,'
30
- new_title = 'model="openai/deepseek/deepseek-chat-v3-0324",\n api_base=_os.environ.get("OPENAI_API_BASE", "https://openrouter.ai/api/v1"),\n api_key=_os.environ.get("OPENAI_API_KEY", api_key),'
31
  if old_title in content:
32
  content = content.replace(old_title, new_title)
33
  content = content.replace(' reasoning_effort="low",\n', '')
 
8
  # Add new models to AVAILABLE_MODELS
9
  target = "AVAILABLE_MODELS = _available_models()\n"
10
  patch = '''
11
+ # === PATCH: Add HF Inference + OpenRouter models ===
12
  import os as _os
13
  AVAILABLE_MODELS.extend([
14
+ {"id": "deepseek-ai/DeepSeek-V4-Pro", "label": "DeepSeek V4 Pro", "provider": "huggingface", "tier": "free", "recommended": True},
15
+ {"id": "Qwen/Qwen3-Coder-Next", "label": "Qwen3 Coder Next", "provider": "huggingface", "tier": "free", "recommended": True},
16
+ {"id": "MiniMaxAI/MiniMax-M2.7", "label": "MiniMax M2.7", "provider": "huggingface", "tier": "free"},
17
+ {"id": "zai-org/GLM-5.1", "label": "GLM 5.1", "provider": "huggingface", "tier": "free"},
18
  {"id": "openai/google/gemini-2.0-flash-001", "label": "Gemini 2.0 Flash", "provider": "openrouter", "tier": "free"},
19
+ {"id": "openai/x-ai/grok-4.3", "label": "Grok 4.3", "provider": "openrouter", "tier": "free"},
 
20
  ])
21
  PREMIUM_MODEL_IDS = set() # No premium gate
22
+ DEFAULT_FREE_MODEL_ID = "deepseek-ai/DeepSeek-V4-Pro"
23
  # === END PATCH ===
24
  '''
25
 
 
29
 
30
  # Fix title generation
31
  old_title = 'model="openai/openai/gpt-oss-120b:cerebras",\n api_base="https://router.huggingface.co/v1",\n api_key=api_key,'
32
+ new_title = 'model="deepseek-ai/DeepSeek-V4-Pro",\n api_base=_os.environ.get("OPENAI_API_BASE", "https://router.huggingface.co/v1"),\n api_key=_os.environ.get("OPENAI_API_KEY", api_key),'
33
  if old_title in content:
34
  content = content.replace(old_title, new_title)
35
  content = content.replace(' reasoning_effort="low",\n', '')