File size: 2,707 Bytes
11757fc
a682471
 
 
 
 
11757fc
a682471
 
11757fc
 
a682471
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11757fc
a682471
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86c9a1d
11757fc
 
 
 
 
 
 
 
 
 
 
86c9a1d
 
a682471
 
 
 
11757fc
a682471
 
 
 
 
 
11757fc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
"""Patch frontend: add 4 new models right after the Laguna S 2.1 entry.

Same `openai/`-prefix model-path convention as Laguna S 2.1
(`openai/poolside/laguna-s-2.1:free`): the backend strips the `openai/`
prefix and routes the request to OpenRouter.

New models:
  - dots-studio/dots-3-note-preview:free  -> openai/dots-studio/dots-3-note-preview:free
  - qwen/qwen3.8-27b:free                 -> openai/qwen/qwen3.8-27b:free
  - respan/span-01-lite                   -> openai/respan/span-01-lite
  - inclusionai/ming-image-0.1-design     -> openai/inclusionai/ming-image-0.1-design
"""

import os
import sys

FILE = "/source/frontend/src/components/Chat/ChatInput.tsx"
MARKER = "dots-3-note-preview"

if not os.path.exists(FILE):
    print(f"FAIL: {FILE} not found")
    sys.exit(1)

with open(FILE, "r", encoding="utf-8") as f:
    content = f.read()

if MARKER in content:
    print("OK: 4 new models already present in ChatInput.tsx (idempotent)")
    sys.exit(0)

anchor = (
    "  {\n"
    "    id: 'laguna-s21',\n"
    "    name: 'Laguna S 2.1:free',\n"
    "    modelPath: 'openai/poolside/laguna-s-2.1:free',\n"
    "    avatarUrl: 'https://huggingface.co/api/avatars/poolside',\n"
    "    recommended: true,\n"
    "  },\n"
)

new_entries = (
    "  {\n"
    "    id: 'dots-3-note-preview',\n"
    "    name: 'dots-studio/dots-3-note-preview:free',\n"
    "    modelPath: 'openai/dots-studio/dots-3-note-preview:free',\n"
    "    avatarUrl: 'https://huggingface.co/api/avatars/dots-studio',\n"
    "    recommended: true,\n"
    "  },\n"
    "  {\n"
    "    id: 'qwen3-8-27b',\n"
    "    name: 'qwen/qwen3.8-27b:free',\n"
    "    modelPath: 'openai/qwen/qwen3.8-27b:free',\n"
    "    avatarUrl: 'https://huggingface.co/api/avatars/qwen',\n"
    "    recommended: true,\n"
    "  },\n"
    "  {\n"
    "    id: 'span-01-lite',\n"
    "    name: 'respan/span-01-lite',\n"
    "    modelPath: 'openai/respan/span-01-lite',\n"
    "    avatarUrl: 'https://huggingface.co/api/avatars/respan',\n"
    "    recommended: true,\n"
    "  },\n"
    "  {\n"
    "    id: 'ming-image-0-1-design',\n"
    "    name: 'inclusionai/ming-image-0.1-design',\n"
    "    modelPath: 'openai/inclusionai/ming-image-0.1-design',\n"
    "    avatarUrl: 'https://huggingface.co/api/avatars/inclusionai',\n"
    "    recommended: true,\n"
    "  },\n"
)

if anchor in content:
    content = content.replace(anchor, anchor + new_entries, 1)
    print("OK: added 4 new models after Laguna S 2.1")
else:
    print("FAIL: could not find Laguna S 2.1 entry in DEFAULT_MODEL_OPTIONS")
    sys.exit(1)

with open(FILE, "w", encoding="utf-8") as f:
    f.write(content)
print("OK: ChatInput.tsx patched with 4 new models")