bep40 commited on
Commit
035770e
·
verified ·
1 Parent(s): d6a3198

Upload patch_frontend.py

Browse files
Files changed (1) hide show
  1. patch_frontend.py +4 -7
patch_frontend.py CHANGED
@@ -1,9 +1,6 @@
1
  """Patch frontend ChatInput.tsx: Replace entire DEFAULT_MODEL_OPTIONS array + add new models.
2
 
3
- Targets current smolagents/ml-intern source where ModelOption has:
4
- id, name, modelPath, avatarUrl, recommended? (NO description field)
5
-
6
- OpenRouter free models need :free suffix in the model ID for LiteLLM routing.
7
  """
8
 
9
  FILE = "/source/frontend/src/components/Chat/ChatInput.tsx"
@@ -44,7 +41,7 @@ new_array = """const DEFAULT_MODEL_OPTIONS: ModelOption[] = [
44
  {
45
  id: 'owl-alpha',
46
  name: 'Owl Alpha',
47
- modelPath: 'openai/owl-alpha:free',
48
  avatarUrl: 'https://huggingface.co/api/avatars/openrouter',
49
  recommended: true,
50
  },
@@ -138,5 +135,5 @@ content = content.replace(
138
  with open(FILE, "w") as f:
139
  f.write(content)
140
 
141
- print("✅ Frontend patched — 13 models with :free suffix for OpenRouter free tiers")
142
- print(" OpenRouter free models now include :free suffix")
 
1
  """Patch frontend ChatInput.tsx: Replace entire DEFAULT_MODEL_OPTIONS array + add new models.
2
 
3
+ OpenRouter free models need :free suffix. Owl Alpha model ID is openrouter/owl-alpha.
 
 
 
4
  """
5
 
6
  FILE = "/source/frontend/src/components/Chat/ChatInput.tsx"
 
41
  {
42
  id: 'owl-alpha',
43
  name: 'Owl Alpha',
44
+ modelPath: 'openai/openrouter/owl-alpha:free',
45
  avatarUrl: 'https://huggingface.co/api/avatars/openrouter',
46
  recommended: true,
47
  },
 
135
  with open(FILE, "w") as f:
136
  f.write(content)
137
 
138
+ print("✅ Frontend patched — Owl Alpha uses openai/openrouter/owl-alpha:free")
139
+ print(" All OpenRouter free models have :free suffix")