Spaces:
Paused
Paused
Fix: Owl Alpha display name + correct model paths with openai/ prefix
Browse files- patch_frontend.py +17 -13
patch_frontend.py
CHANGED
|
@@ -18,12 +18,17 @@ if idx_end == -1:
|
|
| 18 |
print("❌ Cannot find end of array!")
|
| 19 |
import sys; sys.exit(1)
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
new_models = """ {
|
| 22 |
id: 'owl-alpha',
|
| 23 |
-
name: 'Owl Alpha
|
| 24 |
-
description: '
|
| 25 |
-
modelPath: '
|
| 26 |
-
avatarUrl: 'https://huggingface.co/api/avatars/
|
| 27 |
recommended: true,
|
| 28 |
},
|
| 29 |
{
|
|
@@ -59,22 +64,21 @@ new_models = """ {
|
|
| 59 |
{
|
| 60 |
id: 'gemini-2.0-flash',
|
| 61 |
name: 'Gemini 2.0 Flash',
|
| 62 |
-
description: '
|
| 63 |
-
modelPath: '
|
| 64 |
avatarUrl: 'https://huggingface.co/api/avatars/google',
|
| 65 |
},
|
| 66 |
"""
|
| 67 |
|
| 68 |
content = content[:idx_end] + new_models + content[idx_end:]
|
| 69 |
|
| 70 |
-
# Also remove/replace any default Claude model that shows as first option
|
| 71 |
-
# Replace the default recommended model
|
| 72 |
-
content = content.replace("recommended: true,\n },\n {\n id: 'owl-alpha'", "recommended: false,\n },\n {\n id: 'owl-alpha'")
|
| 73 |
-
|
| 74 |
with open(FILE, "w") as f:
|
| 75 |
f.write(content)
|
| 76 |
|
| 77 |
assert "owl-alpha" in content
|
| 78 |
-
assert "
|
| 79 |
-
assert "
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
print("❌ Cannot find end of array!")
|
| 19 |
import sys; sys.exit(1)
|
| 20 |
|
| 21 |
+
# Also rename Claude Opus 4.7 → Owl Alpha in existing entries
|
| 22 |
+
content = content.replace("Claude Opus 4.7", "Owl Alpha")
|
| 23 |
+
content = content.replace("claude-opus-4.7", "owl-alpha")
|
| 24 |
+
content = content.replace("Claude Opus 4", "Owl Alpha")
|
| 25 |
+
|
| 26 |
new_models = """ {
|
| 27 |
id: 'owl-alpha',
|
| 28 |
+
name: 'Owl Alpha',
|
| 29 |
+
description: 'Mạnh nhất · OpenRouter',
|
| 30 |
+
modelPath: 'openai/owl-alpha',
|
| 31 |
+
avatarUrl: 'https://huggingface.co/api/avatars/xai-org',
|
| 32 |
recommended: true,
|
| 33 |
},
|
| 34 |
{
|
|
|
|
| 64 |
{
|
| 65 |
id: 'gemini-2.0-flash',
|
| 66 |
name: 'Gemini 2.0 Flash',
|
| 67 |
+
description: 'Nhanh · rẻ · OpenRouter',
|
| 68 |
+
modelPath: 'openai/google/gemini-2.0-flash-001',
|
| 69 |
avatarUrl: 'https://huggingface.co/api/avatars/google',
|
| 70 |
},
|
| 71 |
"""
|
| 72 |
|
| 73 |
content = content[:idx_end] + new_models + content[idx_end:]
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
with open(FILE, "w") as f:
|
| 76 |
f.write(content)
|
| 77 |
|
| 78 |
assert "owl-alpha" in content
|
| 79 |
+
assert "DeepSeek-V4-Pro" in content
|
| 80 |
+
assert "Qwen3-Coder-Next" in content
|
| 81 |
+
assert "MiniMax-M2.7" in content
|
| 82 |
+
assert "GLM-5.1" in content
|
| 83 |
+
assert "gemini-2.0-flash" in content
|
| 84 |
+
print("✅ Frontend patched: Owl Alpha, DeepSeek V4 Pro, Qwen3 Coder Next, MiniMax M2.7, GLM 5.1, Gemini Flash")
|