feat: support manual model input and sync provider catalogs
- Allow manual model name input when adding custom providers (NSelect tag mode) - Sync provider model catalogs with Hermes _PROVIDER_MODELS - Add new providers: kimi-coding-cn, moonshot, arcee - Fix provider key naming to match Hermes (kilo→kilocode, vercel→ai-gateway, etc.) - Ensure custom_providers from config.yaml always appear in available-models - Append configured default model to model list if not in catalog - Fix provider deletion with case-insensitive key matching - Add selectOrInput i18n key to all 8 locales Closes #24 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -214,7 +214,8 @@ function handleClose() {
|
||||
v-model:value="formData.model"
|
||||
:options="modelOptions"
|
||||
filterable
|
||||
:placeholder="t('models.selectModel')"
|
||||
tag
|
||||
:placeholder="t('models.selectOrInput')"
|
||||
style="flex: 1"
|
||||
/>
|
||||
<NButton
|
||||
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
apiKey: 'API-Schlussel',
|
||||
apiKeyPlaceholder: 'sk-...',
|
||||
defaultModel: 'Standardmodell',
|
||||
selectOrInput: 'Modell auswählen oder eingeben...',
|
||||
selectModel: 'Modell auswahlen...',
|
||||
providerAdded: 'Anbieter hinzugefugt',
|
||||
providerDeleted: 'Anbieter geloscht',
|
||||
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
apiKey: 'API Key',
|
||||
apiKeyPlaceholder: 'sk-...',
|
||||
defaultModel: 'Default Model',
|
||||
selectOrInput: 'Select or type a model name...',
|
||||
selectModel: 'Select a model...',
|
||||
providerAdded: 'Provider added',
|
||||
providerDeleted: 'Provider deleted',
|
||||
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
apiKey: 'Clave API',
|
||||
apiKeyPlaceholder: 'sk-...',
|
||||
defaultModel: 'Modelo predeterminado',
|
||||
selectOrInput: 'Seleccionar o ingresar un modelo...',
|
||||
selectModel: 'Seleccionar un modelo...',
|
||||
providerAdded: 'Proveedor anadido',
|
||||
providerDeleted: 'Proveedor eliminado',
|
||||
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
apiKey: 'Cle API',
|
||||
apiKeyPlaceholder: 'sk-...',
|
||||
defaultModel: 'Modele par defaut',
|
||||
selectOrInput: 'Sélectionner ou saisir un modèle...',
|
||||
selectModel: 'Selectionner un modele...',
|
||||
providerAdded: 'Fournisseur ajoute',
|
||||
providerDeleted: 'Fournisseur supprime',
|
||||
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
apiKey: 'API キー',
|
||||
apiKeyPlaceholder: 'sk-...',
|
||||
defaultModel: 'デフォルトモデル',
|
||||
selectOrInput: 'モデルを選択または入力...',
|
||||
selectModel: 'モデルを選択...',
|
||||
providerAdded: 'プロバイダーを追加しました',
|
||||
providerDeleted: 'プロバイダーを削除しました',
|
||||
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
apiKey: 'API Key',
|
||||
apiKeyPlaceholder: 'sk-...',
|
||||
defaultModel: '기본 모델',
|
||||
selectOrInput: '모델 선택 또는 직접 입력...',
|
||||
selectModel: '모델 선택...',
|
||||
providerAdded: 'Provider가 추가되었습니다',
|
||||
providerDeleted: 'Provider가 삭제되었습니다',
|
||||
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
apiKey: 'Chave API',
|
||||
apiKeyPlaceholder: 'sk-...',
|
||||
defaultModel: 'Modelo padrao',
|
||||
selectOrInput: 'Selecionar ou digitar um modelo...',
|
||||
selectModel: 'Selecionar um modelo...',
|
||||
providerAdded: 'Provedor adicionado',
|
||||
providerDeleted: 'Provedor excluido',
|
||||
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
apiKey: 'API Key',
|
||||
apiKeyPlaceholder: 'sk-...',
|
||||
defaultModel: '默认模型',
|
||||
selectOrInput: '选择或输入模型名称...',
|
||||
selectModel: '选择模型...',
|
||||
providerAdded: 'Provider 已添加',
|
||||
providerDeleted: 'Provider 已删除',
|
||||
|
||||
@@ -16,6 +16,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
||||
value: 'anthropic',
|
||||
base_url: 'https://api.anthropic.com',
|
||||
models: [
|
||||
'claude-opus-4-7',
|
||||
'claude-opus-4-6',
|
||||
'claude-sonnet-4-6',
|
||||
'claude-opus-4-5-20251101',
|
||||
@@ -50,11 +51,11 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
||||
label: 'Z.AI / GLM',
|
||||
value: 'zai',
|
||||
base_url: 'https://api.z.ai/api/paas/v4',
|
||||
models: ['glm-5', 'glm-5-turbo', 'glm-4.7', 'glm-4.5', 'glm-4.5-flash'],
|
||||
models: ['glm-5.1', 'glm-5', 'glm-5v-turbo', 'glm-5-turbo', 'glm-4.7', 'glm-4.5', 'glm-4.5-flash'],
|
||||
},
|
||||
{
|
||||
label: 'Kimi for Coding',
|
||||
value: 'kimi-for-coding',
|
||||
value: 'kimi-coding',
|
||||
base_url: 'https://api.kimi.com/coding/v1',
|
||||
models: [
|
||||
'kimi-for-coding',
|
||||
@@ -65,22 +66,33 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
||||
'kimi-k2-0905-preview',
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Kimi for Coding (CN)',
|
||||
value: 'kimi-coding-cn',
|
||||
base_url: 'https://api.kimi.com/coding/v1',
|
||||
models: [
|
||||
'kimi-k2.5',
|
||||
'kimi-k2-thinking',
|
||||
'kimi-k2-turbo-preview',
|
||||
'kimi-k2-0905-preview',
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Moonshot',
|
||||
value: 'moonshot',
|
||||
base_url: 'https://api.moonshot.cn/v1',
|
||||
models: [
|
||||
'kimi-k2.5',
|
||||
'kimi-k2-thinking',
|
||||
'kimi-k2-turbo-preview',
|
||||
'kimi-k2-0905-preview',
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'xAI',
|
||||
value: 'xai',
|
||||
base_url: 'https://api.x.ai/v1',
|
||||
models: [
|
||||
'grok-4.20-0309-reasoning',
|
||||
'grok-4.20-0309-non-reasoning',
|
||||
'grok-4-1-fast-reasoning',
|
||||
'grok-4-1-fast-non-reasoning',
|
||||
'grok-4-fast-reasoning',
|
||||
'grok-4-fast-non-reasoning',
|
||||
'grok-4-0709',
|
||||
'grok-code-fast-1',
|
||||
'grok-3',
|
||||
'grok-3-mini',
|
||||
],
|
||||
models: ['grok-4.20-reasoning', 'grok-4-1-fast-reasoning'],
|
||||
},
|
||||
{
|
||||
label: 'MiniMax',
|
||||
@@ -131,7 +143,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
||||
},
|
||||
{
|
||||
label: 'Kilo Code',
|
||||
value: 'kilo',
|
||||
value: 'kilocode',
|
||||
base_url: 'https://api.kilo.ai/api/gateway',
|
||||
models: [
|
||||
'anthropic/claude-opus-4.6',
|
||||
@@ -143,7 +155,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
||||
},
|
||||
{
|
||||
label: 'Vercel AI Gateway',
|
||||
value: 'vercel',
|
||||
value: 'ai-gateway',
|
||||
base_url: 'https://ai-gateway.vercel.sh/v1',
|
||||
models: [
|
||||
'anthropic/claude-opus-4.6',
|
||||
@@ -162,32 +174,58 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
||||
},
|
||||
{
|
||||
label: 'OpenCode Zen',
|
||||
value: 'opencode',
|
||||
value: 'opencode-zen',
|
||||
base_url: 'https://opencode.ai/zen/v1',
|
||||
models: [
|
||||
'gpt-5.4-pro',
|
||||
'gpt-5.4',
|
||||
'gpt-5.3-codex',
|
||||
'gpt-5.3-codex-spark',
|
||||
'gpt-5.2',
|
||||
'gpt-5.2-codex',
|
||||
'gpt-5.1',
|
||||
'gpt-5.1-codex',
|
||||
'gpt-5.1-codex-max',
|
||||
'gpt-5.1-codex-mini',
|
||||
'gpt-5',
|
||||
'gpt-5-codex',
|
||||
'gpt-5-nano',
|
||||
'claude-opus-4-6',
|
||||
'claude-opus-4-5',
|
||||
'claude-opus-4-1',
|
||||
'claude-sonnet-4-6',
|
||||
'claude-sonnet-4-5',
|
||||
'claude-sonnet-4',
|
||||
'claude-haiku-4-5',
|
||||
'claude-3-5-haiku',
|
||||
'gemini-3.1-pro',
|
||||
'gemini-3-pro',
|
||||
'gemini-3-flash',
|
||||
'minimax-m2.7',
|
||||
'minimax-m2.5',
|
||||
'minimax-m2.5-free',
|
||||
'minimax-m2.1',
|
||||
'glm-5',
|
||||
'glm-4.7',
|
||||
'glm-4.6',
|
||||
'kimi-k2.5',
|
||||
'kimi-k2-thinking',
|
||||
'kimi-k2',
|
||||
'qwen3-coder',
|
||||
'big-pickle',
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'OpenCode Go',
|
||||
value: 'opencode-go',
|
||||
base_url: 'https://opencode.ai/zen/go/v1',
|
||||
models: ['glm-5', 'kimi-k2.5', 'mimo-v2-pro', 'mimo-v2-omni', 'minimax-m2.7', 'minimax-m2.5'],
|
||||
models: ['glm-5.1', 'glm-5', 'kimi-k2.5', 'mimo-v2-pro', 'mimo-v2-omni', 'minimax-m2.7', 'minimax-m2.5'],
|
||||
},
|
||||
{
|
||||
label: 'Arcee AI',
|
||||
value: 'arcee',
|
||||
base_url: 'https://api.arcee.ai/v1',
|
||||
models: ['trinity-large-thinking', 'trinity-large-preview', 'trinity-mini'],
|
||||
},
|
||||
{
|
||||
label: 'OpenRouter',
|
||||
|
||||
Reference in New Issue
Block a user