fix: /model display name not use fallback
Browse files- src/utils/model/model.ts +10 -20
src/utils/model/model.ts
CHANGED
|
@@ -443,11 +443,17 @@ export function renderModelSetting(setting: ModelName | ModelAlias): string {
|
|
| 443 |
}
|
| 444 |
|
| 445 |
// @[MODEL LAUNCH]: Add display name cases for the new model (base + [1m] variant if applicable).
|
| 446 |
-
/**
|
| 447 |
-
* Returns a human-readable display name for known public models, or null
|
| 448 |
-
* if the model is not recognized as a public model.
|
| 449 |
-
*/
|
| 450 |
export function getPublicModelDisplayName(model: ModelName): string | null {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 451 |
switch (model) {
|
| 452 |
case getModelStrings().opus46:
|
| 453 |
return 'Opus 4.6'
|
|
@@ -479,22 +485,6 @@ export function getPublicModelDisplayName(model: ModelName): string | null {
|
|
| 479 |
return 'Haiku 4.5'
|
| 480 |
case getModelStrings().haiku35:
|
| 481 |
return 'Haiku 3.5'
|
| 482 |
-
case 'big-pickle':
|
| 483 |
-
return 'Big Pickle'
|
| 484 |
-
case 'gpt-5-nano':
|
| 485 |
-
return 'GPT 5 Nano'
|
| 486 |
-
case 'minimax-m2.5-free':
|
| 487 |
-
return 'MiniMax M2.5 Free'
|
| 488 |
-
case 'minimax-m2.5':
|
| 489 |
-
return 'MiniMax M2.5'
|
| 490 |
-
case 'hy3-preview-free':
|
| 491 |
-
return 'HY3 Preview Free'
|
| 492 |
-
case 'ling-2.6-flash-free':
|
| 493 |
-
return 'Ling 2.6 Flash Free'
|
| 494 |
-
case 'trinity-large-preview-free':
|
| 495 |
-
return 'Trinity Large Preview Free'
|
| 496 |
-
case 'nemotron-3-super-free':
|
| 497 |
-
return 'Nemotron 3 Super Free'
|
| 498 |
default:
|
| 499 |
return null
|
| 500 |
}
|
|
|
|
| 443 |
}
|
| 444 |
|
| 445 |
// @[MODEL LAUNCH]: Add display name cases for the new model (base + [1m] variant if applicable).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 446 |
export function getPublicModelDisplayName(model: ModelName): string | null {
|
| 447 |
+
// Check OpenCode Zen models first (before getModelStrings() which maps them to aliases)
|
| 448 |
+
if (model === 'big-pickle') return 'Big Pickle'
|
| 449 |
+
if (model === 'gpt-5-nano') return 'GPT 5 Nano'
|
| 450 |
+
if (model === 'minimax-m2.5-free') return 'MiniMax M2.5 Free'
|
| 451 |
+
if (model === 'minimax-m2.5') return 'MiniMax M2.5'
|
| 452 |
+
if (model === 'hy3-preview-free') return 'HY3 Preview Free'
|
| 453 |
+
if (model === 'ling-2.6-flash-free') return 'Ling 2.6 Flash Free'
|
| 454 |
+
if (model === 'trinity-large-preview-free') return 'Trinity Large Preview Free'
|
| 455 |
+
if (model === 'nemotron-3-super-free') return 'Nemotron 3 Super Free'
|
| 456 |
+
|
| 457 |
switch (model) {
|
| 458 |
case getModelStrings().opus46:
|
| 459 |
return 'Opus 4.6'
|
|
|
|
| 485 |
return 'Haiku 4.5'
|
| 486 |
case getModelStrings().haiku35:
|
| 487 |
return 'Haiku 3.5'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 488 |
default:
|
| 489 |
return null
|
| 490 |
}
|