bep40 commited on
Commit
eae5daf
·
verified ·
1 Parent(s): 402458c

Upload patch_frontend.py

Browse files
Files changed (1) hide show
  1. patch_frontend.py +6 -6
patch_frontend.py CHANGED
@@ -26,6 +26,12 @@ model_content = model_content.replace(
26
  "export const DEEPSEEK_V4_PRO_MODEL_PATH = 'nvidia/nemotron-3-super-120b-a12b:free';"
27
  )
28
 
 
 
 
 
 
 
29
  with open(MODEL_FILE, "w") as f:
30
  f.write(model_content)
31
  print("✅ model.ts constants updated")
@@ -58,12 +64,6 @@ content = content.replace(
58
  " {\n id: 'nemotron-120b',\n name: 'nvidia/nemotron-3-super-120b-a12b:free',\n modelPath: DEEPSEEK_V4_PRO_MODEL_PATH,\n avatarUrl: 'https://huggingface.co/api/avatars/nvidia',\n },"
59
  )
60
 
61
- # Update isClaudePath to avoid obsolete function
62
- content = content.replace(
63
- "export function isClaudePath(modelPath: string | undefined): boolean {\n return !!modelPath && modelPath.includes('anthropic');\n}",
64
- "export function isClaudePath(modelPath: string | undefined): boolean {\n return !!modelPath && modelPath.includes('openrouter');\n}"
65
- )
66
-
67
  # === Add custom models at end of DEFAULT_MODEL_OPTIONS array ===
68
  # ModelOption interface has no 'description' field — only: id, name, modelPath, avatarUrl, recommended?
69
  idx_end = content.find("];", content.find("DEFAULT_MODEL_OPTIONS") if "DEFAULT_MODEL_OPTIONS" in content else 0)
 
26
  "export const DEEPSEEK_V4_PRO_MODEL_PATH = 'nvidia/nemotron-3-super-120b-a12b:free';"
27
  )
28
 
29
+ # isClaudePath is defined in model.ts - update to match new model paths
30
+ model_content = model_content.replace(
31
+ "export function isClaudePath(modelPath: string | undefined): boolean {\n return !!modelPath && modelPath.includes('anthropic');\n}",
32
+ "export function isClaudePath(modelPath: string | undefined): boolean {\n return !!modelPath && modelPath.includes('openrouter');\n}"
33
+ )
34
+
35
  with open(MODEL_FILE, "w") as f:
36
  f.write(model_content)
37
  print("✅ model.ts constants updated")
 
64
  " {\n id: 'nemotron-120b',\n name: 'nvidia/nemotron-3-super-120b-a12b:free',\n modelPath: DEEPSEEK_V4_PRO_MODEL_PATH,\n avatarUrl: 'https://huggingface.co/api/avatars/nvidia',\n },"
65
  )
66
 
 
 
 
 
 
 
67
  # === Add custom models at end of DEFAULT_MODEL_OPTIONS array ===
68
  # ModelOption interface has no 'description' field — only: id, name, modelPath, avatarUrl, recommended?
69
  idx_end = content.find("];", content.find("DEFAULT_MODEL_OPTIONS") if "DEFAULT_MODEL_OPTIONS" in content else 0)