315 lines
8.0 KiB
TypeScript
315 lines
8.0 KiB
TypeScript
/**
|
|
* Provider registry — single source of truth for both frontend and backend.
|
|
* Synced from hermes-agent hermes_cli/models.py _PROVIDER_MODELS.
|
|
*/
|
|
|
|
export interface ProviderPreset {
|
|
label: string
|
|
value: string
|
|
base_url: string
|
|
models: string[]
|
|
builtin: boolean
|
|
}
|
|
|
|
export const PROVIDER_PRESETS: ProviderPreset[] = [
|
|
{
|
|
label: 'Anthropic',
|
|
value: 'anthropic',
|
|
builtin: true,
|
|
base_url: 'https://api.anthropic.com',
|
|
models: [
|
|
'claude-opus-4-7',
|
|
'claude-opus-4-6',
|
|
'claude-sonnet-4-6',
|
|
'claude-opus-4-5-20251101',
|
|
'claude-sonnet-4-5-20250929',
|
|
'claude-opus-4-20250514',
|
|
'claude-sonnet-4-20250514',
|
|
'claude-haiku-4-5-20251001',
|
|
],
|
|
},
|
|
{
|
|
label: 'Google AI Studio',
|
|
value: 'gemini',
|
|
builtin: true,
|
|
base_url: 'https://generativelanguage.googleapis.com/v1beta/openai',
|
|
models: [
|
|
'gemini-3.1-pro-preview',
|
|
'gemini-3-flash-preview',
|
|
'gemini-3.1-flash-lite-preview',
|
|
'gemini-2.5-pro',
|
|
'gemini-2.5-flash',
|
|
'gemini-2.5-flash-lite',
|
|
'gemma-4-31b-it',
|
|
'gemma-4-26b-it',
|
|
],
|
|
},
|
|
{
|
|
label: 'DeepSeek',
|
|
value: 'deepseek',
|
|
builtin: true,
|
|
base_url: 'https://api.deepseek.com',
|
|
models: ['deepseek-chat', 'deepseek-reasoner'],
|
|
},
|
|
{
|
|
label: 'Z.AI / GLM',
|
|
value: 'zai',
|
|
builtin: true,
|
|
base_url: 'https://api.z.ai/api/paas/v4',
|
|
models: ['glm-5.1', 'glm-5', 'glm-5v-turbo', 'glm-5-turbo', 'glm-4.7', 'glm-4.5', 'glm-4.5-flash'],
|
|
},
|
|
{
|
|
label: 'GLM-Coding-Plan',
|
|
value: 'glm-coding-plan',
|
|
builtin: true,
|
|
base_url: 'https://api.z.ai/api/anthropic',
|
|
models: ['glm-5.1', 'glm-5', 'glm-5-turbo', 'glm-4.7', 'glm-4.5', 'glm-4.5-flash'],
|
|
},
|
|
{
|
|
label: 'Kimi for Coding',
|
|
value: 'kimi-coding-cn',
|
|
builtin: true,
|
|
base_url: 'https://api.kimi.com/coding/v1',
|
|
models: [
|
|
'kimi-for-coding',
|
|
'kimi-k2.6',
|
|
'kimi-k2.5',
|
|
'kimi-k2-thinking',
|
|
'kimi-k2-turbo-preview',
|
|
'kimi-k2-0905-preview',
|
|
],
|
|
},
|
|
{
|
|
label: 'Moonshot',
|
|
value: 'moonshot',
|
|
builtin: true,
|
|
base_url: 'https://api.moonshot.cn/v1',
|
|
models: [
|
|
'kimi-k2.6',
|
|
'kimi-k2.5',
|
|
'kimi-k2-thinking',
|
|
'kimi-k2-turbo-preview',
|
|
'kimi-k2-0905-preview',
|
|
],
|
|
},
|
|
{
|
|
label: 'xAI',
|
|
value: 'xai',
|
|
builtin: true,
|
|
base_url: 'https://api.x.ai/v1',
|
|
models: ['grok-4.20-reasoning', 'grok-4-1-fast-reasoning'],
|
|
},
|
|
{
|
|
label: 'MiniMax',
|
|
value: 'minimax',
|
|
builtin: true,
|
|
base_url: 'https://api.minimax.io/anthropic/v1',
|
|
models: ['MiniMax-M2.7', 'MiniMax-M2.7-highspeed', 'MiniMax-M2.5', 'MiniMax-M2.5-highspeed', 'MiniMax-M2.1', 'MiniMax-M2.1-highspeed', 'MiniMax-M2', 'MiniMax-M2-highspeed'],
|
|
},
|
|
{
|
|
label: 'MiniMax (China)',
|
|
value: 'minimax-cn',
|
|
builtin: true,
|
|
base_url: 'https://api.minimaxi.com/v1',
|
|
models: ['MiniMax-M2.7', 'MiniMax-M2.7-highspeed', 'MiniMax-M2.5', 'MiniMax-M2.5-highspeed', 'MiniMax-M2.1', 'MiniMax-M2.1-highspeed', 'MiniMax-M2', 'MiniMax-M2-highspeed'],
|
|
},
|
|
{
|
|
label: 'Alibaba Cloud',
|
|
value: 'alibaba',
|
|
builtin: true,
|
|
base_url: 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1',
|
|
models: [
|
|
'qwen3.5-plus',
|
|
'qwen3-coder-plus',
|
|
'qwen3-coder-next',
|
|
'glm-5',
|
|
'glm-4.7',
|
|
'kimi-k2.5',
|
|
'MiniMax-M2.5',
|
|
],
|
|
},
|
|
{
|
|
label: 'Hugging Face',
|
|
value: 'huggingface',
|
|
builtin: true,
|
|
base_url: 'https://router.huggingface.co/v1',
|
|
models: [
|
|
'Qwen/Qwen3.5-397B-A17B',
|
|
'Qwen/Qwen3.5-35B-A3B',
|
|
'deepseek-ai/DeepSeek-V3.2',
|
|
'moonshotai/Kimi-K2.5',
|
|
'MiniMaxAI/MiniMax-M2.5',
|
|
'zai-org/GLM-5',
|
|
'XiaomiMiMo/MiMo-V2-Flash',
|
|
'moonshotai/Kimi-K2-Thinking',
|
|
],
|
|
},
|
|
{
|
|
label: 'Xiaomi MiMo',
|
|
value: 'xiaomi',
|
|
builtin: true,
|
|
base_url: 'https://api.xiaomimimo.com/v1',
|
|
models: ['mimo-v2-pro', 'mimo-v2-omni', 'mimo-v2-flash'],
|
|
},
|
|
{
|
|
label: 'Kilo Code',
|
|
value: 'kilocode',
|
|
builtin: true,
|
|
base_url: 'https://api.kilo.ai/api/gateway',
|
|
models: [
|
|
'anthropic/claude-opus-4.6',
|
|
'anthropic/claude-sonnet-4.6',
|
|
'openai/gpt-5.4',
|
|
'google/gemini-3-pro-preview',
|
|
'google/gemini-3-flash-preview',
|
|
],
|
|
},
|
|
{
|
|
label: 'Vercel AI Gateway',
|
|
value: 'ai-gateway',
|
|
builtin: true,
|
|
base_url: 'https://ai-gateway.vercel.sh/v1',
|
|
models: [
|
|
'anthropic/claude-opus-4.6',
|
|
'anthropic/claude-sonnet-4.6',
|
|
'anthropic/claude-sonnet-4.5',
|
|
'anthropic/claude-haiku-4.5',
|
|
'openai/gpt-5',
|
|
'openai/gpt-4.1',
|
|
'openai/gpt-4.1-mini',
|
|
'google/gemini-3-pro-preview',
|
|
'google/gemini-3-flash',
|
|
'google/gemini-2.5-pro',
|
|
'google/gemini-2.5-flash',
|
|
'deepseek/deepseek-v3.2',
|
|
],
|
|
},
|
|
{
|
|
label: 'OpenCode Zen',
|
|
value: 'opencode-zen',
|
|
builtin: true,
|
|
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',
|
|
builtin: true,
|
|
base_url: 'https://opencode.ai/zen/go/v1',
|
|
models: ['glm-5.1', 'glm-5', 'kimi-k2.5', 'mimo-v2-pro', 'mimo-v2-omni', 'minimax-m2.7', 'minimax-m2.5'],
|
|
},
|
|
{
|
|
label: 'OpenAI Codex',
|
|
value: 'openai-codex',
|
|
builtin: true,
|
|
base_url: 'https://chatgpt.com/backend-api/codex',
|
|
models: ['gpt-5.5', 'gpt-5.4-mini', 'gpt-5.4', 'gpt-5.3-codex', 'gpt-5.2-codex', 'gpt-5.1-codex-max', 'gpt-5.1-codex-mini'],
|
|
},
|
|
{
|
|
label: 'Arcee AI',
|
|
value: 'arcee',
|
|
builtin: true,
|
|
base_url: 'https://api.arcee.ai/v1',
|
|
models: ['trinity-large-thinking', 'trinity-large-preview', 'trinity-mini'],
|
|
},
|
|
{
|
|
label: 'Nous Portal',
|
|
value: 'nous',
|
|
builtin: true,
|
|
base_url: 'https://inference-api.nousresearch.com/v1',
|
|
models: [
|
|
'moonshotai/kimi-k2.6',
|
|
'xiaomi/mimo-v2.5-pro',
|
|
'xiaomi/mimo-v2.5',
|
|
'anthropic/claude-opus-4.7',
|
|
'anthropic/claude-opus-4.6',
|
|
'anthropic/claude-sonnet-4.6',
|
|
'anthropic/claude-sonnet-4.5',
|
|
'anthropic/claude-haiku-4.5',
|
|
'openai/gpt-5.4',
|
|
'openai/gpt-5.4-mini',
|
|
'openai/gpt-5.3-codex',
|
|
'google/gemini-3-pro-preview',
|
|
'google/gemini-3-flash-preview',
|
|
'google/gemini-3.1-pro-preview',
|
|
'google/gemini-3.1-flash-lite-preview',
|
|
'qwen/qwen3.5-plus-02-15',
|
|
'qwen/qwen3.5-35b-a3b',
|
|
'stepfun/step-3.5-flash',
|
|
'minimax/minimax-m2.7',
|
|
'minimax/minimax-m2.5',
|
|
'minimax/minimax-m2.5:free',
|
|
'z-ai/glm-5.1',
|
|
'z-ai/glm-5v-turbo',
|
|
'z-ai/glm-5-turbo',
|
|
'x-ai/grok-4.20-beta',
|
|
'nvidia/nemotron-3-super-120b-a12b',
|
|
'arcee-ai/trinity-large-thinking',
|
|
'openai/gpt-5.4-pro',
|
|
'openai/gpt-5.4-nano',
|
|
],
|
|
},
|
|
{
|
|
label: 'StepFun',
|
|
value: 'stepfun',
|
|
builtin: true,
|
|
base_url: 'https://api.stepfun.ai/step_plan/v1',
|
|
models: ['step-3.5-flash', 'step-3.5-flash-2603'],
|
|
},
|
|
{
|
|
label: 'OpenRouter',
|
|
value: 'openrouter',
|
|
builtin: true,
|
|
base_url: 'https://openrouter.ai/api/v1',
|
|
models: [],
|
|
},
|
|
]
|
|
|
|
/** Build a Record<providerKey, models[]> for backend lookup */
|
|
export function buildProviderModelMap(): Record<string, string[]> {
|
|
const map: Record<string, string[]> = {}
|
|
for (const p of PROVIDER_PRESETS) {
|
|
if (p.models.length > 0) {
|
|
map[p.value] = p.models
|
|
}
|
|
}
|
|
return map
|
|
}
|