chore: add free gpt5 nano and big pickle in /model
Browse files- src/utils/model/model.ts +16 -0
- src/utils/model/modelOptions.ts +33 -18
src/utils/model/model.ts
CHANGED
|
@@ -479,6 +479,22 @@ export function getPublicModelDisplayName(model: ModelName): string | null {
|
|
| 479 |
return 'Haiku 4.5'
|
| 480 |
case getModelStrings().haiku35:
|
| 481 |
return 'Haiku 3.5'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 482 |
default:
|
| 483 |
return null
|
| 484 |
}
|
|
|
|
| 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 |
}
|
src/utils/model/modelOptions.ts
CHANGED
|
@@ -95,7 +95,6 @@ export function getDefaultOptionForUser(fastMode = false): ModelOption {
|
|
| 95 |
}
|
| 96 |
|
| 97 |
// Check if we should use OpenCode Zen model
|
| 98 |
-
let openCodeModelName: string | null = null
|
| 99 |
if (isOpenCode || provider === null) {
|
| 100 |
try {
|
| 101 |
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
@@ -106,23 +105,21 @@ export function getDefaultOptionForUser(fastMode = false): ModelOption {
|
|
| 106 |
authProvider?: string
|
| 107 |
openCodeModelName?: string
|
| 108 |
}
|
| 109 |
-
if (config.authProvider === 'opencode'
|
| 110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
}
|
| 112 |
} catch {
|
| 113 |
// Ignore errors
|
| 114 |
}
|
| 115 |
}
|
| 116 |
|
| 117 |
-
if (openCodeModelName) {
|
| 118 |
-
return {
|
| 119 |
-
value: null,
|
| 120 |
-
label: 'Default (recommended)',
|
| 121 |
-
description: `Use the default OpenCode Zen model (currently ${openCodeModelName})`,
|
| 122 |
-
descriptionForModel: `Default OpenCode Zen model (currently ${openCodeModelName})`,
|
| 123 |
-
}
|
| 124 |
-
}
|
| 125 |
-
|
| 126 |
if (localModelName) {
|
| 127 |
return {
|
| 128 |
value: null,
|
|
@@ -509,11 +506,30 @@ function getModelOptionsBase(fastMode = false): ModelOption[] {
|
|
| 509 |
if (filtered.length > 0) {
|
| 510 |
return [
|
| 511 |
defaultOpt,
|
| 512 |
-
...filtered.map(m =>
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 517 |
]
|
| 518 |
}
|
| 519 |
}
|
|
@@ -521,7 +537,6 @@ function getModelOptionsBase(fastMode = false): ModelOption[] {
|
|
| 521 |
// Ignore errors
|
| 522 |
}
|
| 523 |
|
| 524 |
-
// Return only default if models are not yet fetched
|
| 525 |
return [defaultOpt]
|
| 526 |
}
|
| 527 |
|
|
|
|
| 95 |
}
|
| 96 |
|
| 97 |
// Check if we should use OpenCode Zen model
|
|
|
|
| 98 |
if (isOpenCode || provider === null) {
|
| 99 |
try {
|
| 100 |
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
|
|
| 105 |
authProvider?: string
|
| 106 |
openCodeModelName?: string
|
| 107 |
}
|
| 108 |
+
if (config.authProvider === 'opencode') {
|
| 109 |
+
const currentModel = config.openCodeModelName || 'big-pickle'
|
| 110 |
+
const displayName = currentModel === 'big-pickle' ? 'Big Pickle' : currentModel
|
| 111 |
+
return {
|
| 112 |
+
value: null,
|
| 113 |
+
label: 'Default (recommended)',
|
| 114 |
+
description: `Use the default OpenCode Zen model (currently ${displayName})`,
|
| 115 |
+
descriptionForModel: `Default OpenCode Zen model (currently ${displayName})`,
|
| 116 |
+
}
|
| 117 |
}
|
| 118 |
} catch {
|
| 119 |
// Ignore errors
|
| 120 |
}
|
| 121 |
}
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
if (localModelName) {
|
| 124 |
return {
|
| 125 |
value: null,
|
|
|
|
| 506 |
if (filtered.length > 0) {
|
| 507 |
return [
|
| 508 |
defaultOpt,
|
| 509 |
+
...filtered.map(m => {
|
| 510 |
+
let label = m.name || m.id
|
| 511 |
+
let description = hasApiKey ? 'OpenCode Zen Model' : '限时免费模型'
|
| 512 |
+
|
| 513 |
+
if (m.id === 'big-pickle') {
|
| 514 |
+
label = 'Big Pickle'
|
| 515 |
+
description = '旗舰模型,限时免费,适合复杂任务'
|
| 516 |
+
} else if (m.id === 'gpt-5-nano') {
|
| 517 |
+
label = 'GPT 5 Nano'
|
| 518 |
+
description = '永久免费,轻量快速,隐私安全'
|
| 519 |
+
} else if (m.id === 'minimax-m2.5-free') {
|
| 520 |
+
label = 'MiniMax M2.5 Free'
|
| 521 |
+
} else if (m.id === 'hy3-preview-free') {
|
| 522 |
+
label = 'HY3 Preview Free'
|
| 523 |
+
} else if (m.id === 'ling-2.6-flash-free') {
|
| 524 |
+
label = 'Ling 2.6 Flash Free'
|
| 525 |
+
} else if (m.id === 'trinity-large-preview-free') {
|
| 526 |
+
label = 'Trinity Large Preview Free'
|
| 527 |
+
} else if (m.id === 'nemotron-3-super-free') {
|
| 528 |
+
label = 'Nemotron 3 Super Free'
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
return { value: m.id, label, description }
|
| 532 |
+
}),
|
| 533 |
]
|
| 534 |
}
|
| 535 |
}
|
|
|
|
| 537 |
// Ignore errors
|
| 538 |
}
|
| 539 |
|
|
|
|
| 540 |
return [defaultOpt]
|
| 541 |
}
|
| 542 |
|