Spaces:
Running
Running
Upload patch_models.py
#7
by bep40 - opened
- patch_models.py +3 -3
patch_models.py
CHANGED
|
@@ -125,7 +125,7 @@ new_func = (
|
|
| 125 |
' {"id": MINIMAX_M3_MODEL_ID, "label": "DeepSeek V4 Flash"},\n'
|
| 126 |
' {"id": DEFAULT_MODEL_ID, "label": "DeepSeek V4 Flash"},\n'
|
| 127 |
' {"id": DEEPSEEK_V4_PRO_MODEL_ID, "label": "Nemotron 3 Super 120B"},\n'
|
| 128 |
-
' {"id": DEEPSEEK_V4_FLASH_LATEST_MODEL_ID, "label": "DeepSeek V4 Flash latest"},\n'
|
| 129 |
" ]\n"
|
| 130 |
" return models"
|
| 131 |
)
|
|
@@ -190,8 +190,8 @@ if "normalized_model.startswith" not in llm_content:
|
|
| 190 |
if api_key_find in llm_content:
|
| 191 |
line_end = llm_content.find("\n", llm_content.find(api_key_find) + len(api_key_find)) + 1
|
| 192 |
routing_insert = (
|
| 193 |
-
' # Route
|
| 194 |
-
' if normalized_model.startswith("
|
| 195 |
' return {\n'
|
| 196 |
' "model": normalized_model,\n'
|
| 197 |
' "api_base": "https://openrouter.ai/api/v1",\n'
|
|
|
|
| 125 |
' {"id": MINIMAX_M3_MODEL_ID, "label": "DeepSeek V4 Flash"},\n'
|
| 126 |
' {"id": DEFAULT_MODEL_ID, "label": "DeepSeek V4 Flash"},\n'
|
| 127 |
' {"id": DEEPSEEK_V4_PRO_MODEL_ID, "label": "Nemotron 3 Super 120B"},\n'
|
| 128 |
+
' {"id": DEEPSEEK_V4_FLASH_LATEST_MODEL_ID, "label": "DeepSeek V4 Flash latest (no tools)"},\n'
|
| 129 |
" ]\n"
|
| 130 |
" return models"
|
| 131 |
)
|
|
|
|
| 190 |
if api_key_find in llm_content:
|
| 191 |
line_end = llm_content.find("\n", llm_content.find(api_key_find) + len(api_key_find)) + 1
|
| 192 |
routing_insert = (
|
| 193 |
+
' # Route openai/-prefixed models to OpenRouter\n'
|
| 194 |
+
' if normalized_model.startswith("openai/"):\n'
|
| 195 |
' return {\n'
|
| 196 |
' "model": normalized_model,\n'
|
| 197 |
' "api_base": "https://openrouter.ai/api/v1",\n'
|