From 1a1572ba78ad2731f4cc2a5d4045e13b2b402221 Mon Sep 17 00:00:00 2001 From: LovelyGuYiMeng <76251800+LovelyGuYiMeng@users.noreply.github.com> Date: Fri, 13 Sep 2024 23:28:31 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20update=20openrouter=20m?= =?UTF-8?q?odel=20list=20(#3954)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update openrouter.ts * Update openrouter.ts * Update openrouter.ts * Update openrouter.ts * Update index.test.ts.snap * Update index.test.ts * Update index.test.ts.snap * Update index.test.ts.snap * Update index.test.ts.snap --- src/config/modelProviders/openrouter.ts | 215 +++++++++++------- .../config/__snapshots__/index.test.ts.snap | 24 +- src/server/routers/edge/config/index.test.ts | 2 +- 3 files changed, 147 insertions(+), 94 deletions(-) diff --git a/src/config/modelProviders/openrouter.ts b/src/config/modelProviders/openrouter.ts index 814fedced616..84bd88299b28 100644 --- a/src/config/modelProviders/openrouter.ts +++ b/src/config/modelProviders/openrouter.ts @@ -15,124 +15,181 @@ const OpenRouter: ModelProviderCard = { }, { description: - 'Mistral 7B Instruct 是一款高效的多语言模型,优化用于对话和问答,能在资源受限的环境中表现出色。', - displayName: 'Mistral 7B Instruct (free)', + 'o1-mini是一款针对编程、数学和科学应用场景而设计的快速、经济高效的推理模型。该模型具有128K上下文和2023年10月的知识截止日期。', + displayName: 'OpenAI o1-mini', enabled: true, - functionCall: false, - id: 'mistralai/mistral-7b-instruct:free', - tokens: 32_768, - vision: false, + id: 'openai/o1-mini', + maxOutput: 65_536, + pricing: { + input: 3, + output: 12, + }, + releasedAt: '2024-09-12', + tokens: 128_000, }, { - description: 'Google 的 Gemma 7B 具有出色的计算效率,适适用于多种硬件架构,如GPU和TPU。', - displayName: 'Google: Gemma 7B (free)', + description: + 'o1是OpenAI新的推理模型,适用于需要广泛通用知识的复杂任务。该模型具有128K上下文和2023年10月的知识截止日期。', + displayName: 'OpenAI o1-preview', enabled: true, - functionCall: false, - id: 'google/gemma-7b-it:free', - tokens: 8192, - vision: false, + id: 'openai/o1-preview', + maxOutput: 32_768, + pricing: { + input: 15, + output: 60, + }, + releasedAt: '2024-09-12', + tokens: 128_000, }, { - description: 'OpenChat 3.5 是一个创新的开源语言模型库,使用C-RLFT策略优化,支持多种任务。', - displayName: 'OpenChat 3.5 (free)', + description: + 'GPT-4o mini是OpenAI在GPT-4 Omni之后推出的最新模型,支持图文输入并输出文本。作为他们最先进的小型模型,它比其他近期的前沿模型便宜很多,并且比GPT-3.5 Turbo便宜超过60%。它保持了最先进的智能,同时具有显著的性价比。GPT-4o mini在MMLU测试中获得了 82% 的得分,目前在聊天偏好上排名高于 GPT-4。', + displayName: 'GPT-4o mini', enabled: true, - functionCall: false, - id: 'openchat/openchat-7b:free', - tokens: 8192, - vision: false, + functionCall: true, + id: 'openai/gpt-4o-mini', + maxOutput: 16_385, + pricing: { + input: 0.15, + output: 0.6, + }, + tokens: 128_000, + vision: true, }, { - description: 'Nous Capybara 7B 专为基础任务设计,提供高效的语言处理能力。', - displayName: 'Nous: Capybara 7B (free)', + description: + 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。', + displayName: 'GPT-4o 0806', enabled: true, - functionCall: false, - id: 'nousresearch/nous-capybara-7b:free', - tokens: 4096, - vision: false, + functionCall: true, + id: 'openai/gpt-4o-2024-08-06', + pricing: { + input: 2.5, + output: 10, + }, + tokens: 128_000, + vision: true, }, { - description: 'Hugging Face的Zephyr 7B,以小巧身形实现了超越许多大型模型的性能。', - displayName: 'Hugging Face: Zephyr 7B (free)', + description: + 'Claude 3 Haiku 是 Anthropic 的最快且最紧凑的模型,旨在实现近乎即时的响应。它具有快速且准确的定向性能。', + displayName: 'Claude 3 Haiku', enabled: true, - functionCall: false, - id: 'huggingfaceh4/zephyr-7b-beta:free', - tokens: 4096, - vision: false, + functionCall: true, + id: 'anthropic/claude-3-haiku', + maxOutput: 4096, + pricing: { + input: 0.25, + output: 1.25, + }, + releasedAt: '2024-03-07', + tokens: 200_000, + vision: true, }, { - description: 'MythoMist 7B 为实验性最强的Mistral合并模型,结合了最新算法。', - displayName: 'MythoMist 7B (free)', + description: + 'Claude 3.5 Sonnet 提供了超越 Opus 的能力和比 Sonnet 更快的速度,同时保持与 Sonnet 相同的价格。Sonnet 特别擅长编程、数据科学、视觉处理、代理任务。', + displayName: 'Claude 3.5 Sonnet', enabled: true, - functionCall: false, - id: 'gryphe/mythomist-7b:free', - tokens: 32_768, - vision: false, + functionCall: true, + id: 'anthropic/claude-3.5-sonnet', + maxOutput: 8192, + pricing: { + cachedInput: 0.3, + input: 3, + output: 15, + writeCacheInput: 3.75, + }, + releasedAt: '2024-06-20', + tokens: 200_000, + vision: true, }, { - description: 'Toppy M 7B 是一个开源模型,旨在通过开源科学推进人工智能的普及。', - displayName: 'Toppy M 7B (free)', + description: + 'Claude 3 Opus 是 Anthropic 用于处理高度复杂任务的最强大模型。它在性能、智能、流畅性和理解力方面表现卓越。', + displayName: 'Claude 3 Opus', enabled: true, - functionCall: false, - id: 'undi95/toppy-m-7b:free', - tokens: 4096, - vision: false, + functionCall: true, + id: 'anthropic/claude-3-opus', + maxOutput: 4096, + pricing: { + input: 15, + output: 75, + }, + releasedAt: '2024-02-29', + tokens: 200_000, + vision: true, }, { - description: 'Cinematika 7B 模型将电影剧本转换为小说风格,适用于创意内容生成。', - displayName: 'Cinematika 7B (alpha) (free)', + description: 'Gemini 1.5 Flash 0827 提供了优化后的多模态处理能力,适用多种复杂任务场景。', + displayName: 'Gemini 1.5 Flash 0827', enabled: true, - functionCall: false, - id: 'openrouter/cinematika-7b:free', - tokens: 8000, - vision: false, + functionCall: true, + id: 'google/gemini-flash-1.5-exp', + maxOutput: 8192, + pricing: { + cachedInput: 0.018_75, + input: 0.075, + output: 0.3, + }, + releasedAt: '2024-08-27', + tokens: 1_048_576 + 8192, + vision: true, }, { - description: 'RWKV v5 World 3B 结合了 RNN 和 Transformer,实现了卓越的多语言处理能力。', - displayName: 'RWKV v5 World 3B (free)', + description: 'Gemini 1.5 Pro 0827 结合最新优化技术,带来更高效的多模态数据处理能力。', + displayName: 'Gemini 1.5 Pro 0827', enabled: true, - functionCall: false, - id: 'rwkv/rwkv-5-world-3b', - tokens: 10_000, - vision: false, + functionCall: true, + id: 'google/gemini-pro-1.5-exp', + maxOutput: 8192, + pricing: { + cachedInput: 0.875, + input: 3.5, + output: 10.5, + }, + releasedAt: '2024-08-27', + tokens: 2_097_152 + 8192, + vision: true, }, { - description: 'RWKV v5 3B AI Town 是为 AI 小镇项目前置量身定制的模型。', - displayName: 'RWKV v5 3B AI Town (free)', + description: + '融合通用与代码能力的全新开源模型, 不仅保留了原有 Chat 模型的通用对话能力和 Coder 模型的强大代码处理能力,还更好地对齐了人类偏好。此外,DeepSeek-V2.5 在写作任务、指令跟随等多个方面也实现了大幅提升。', + displayName: 'DeepSeek-V2.5', enabled: true, - functionCall: false, - id: 'recursal/rwkv-5-3b-ai-town', - tokens: 10_000, - vision: false, + functionCall: true, + id: 'deepseek/deepseek-chat', + pricing: { + cachedInput: 0.014, + input: 0.14, + output: 0.28, + }, + releasedAt: '2024-09-05', + tokens: 128_000, }, { - description: 'RWKV v5 Eagle 7B 以超小成本实现高效的多语言翻译和处理,适用于边缘计算。', - displayName: 'RWKV v5: Eagle 7B (free)', + description: 'Qwen2 是全新的大型语言模型系列,具有更强的理解和生成能力。', + displayName: 'Qwen2 7B (Free)', enabled: true, - functionCall: false, - id: 'recursal/eagle-7b', - tokens: 10_000, - vision: false, + id: 'qwen/qwen-2-7b-instruct:free', + tokens: 32_768, }, { - description: 'Mistral Mixtral 8x22B 提供高性能的基础模型。', - displayName: 'Mistral: Mixtral 8x22B (base)', + description: 'LLaMA 3.1 提供多语言支持,是业界领先的生成模型之一。', + displayName: 'Llama 3.1 8B (Free)', enabled: true, - functionCall: false, - id: 'mistralai/mixtral-8x22b', - tokens: 64_000, - vision: false, + id: 'meta-llama/llama-3.1-8b-instruct:free', + tokens: 32_768, }, { - description: '微软的 WizardLM-2 8x22B 具有高容量和高效能特性。', - displayName: 'Microsoft: WizardLM-2 8x22B', + description: 'Gemma 2 是Google轻量化的开源文本模型系列。', + displayName: 'Gemma 2 9B (Free)', enabled: true, - functionCall: false, - id: 'microsoft/wizardlm-2-8x22b', - tokens: 65_536, - vision: false, + id: 'google/gemma-2-9b-it:free', + tokens: 8192, }, ], - checkModel: 'mistralai/mistral-7b-instruct:free', + checkModel: 'google/gemma-2-9b-it:free', description: 'OpenRouter 是一个提供多种前沿大模型接口的服务平台,支持 OpenAI、Anthropic、LLaMA 及更多,适合多样化的开发和应用需求。用户可根据自身需求灵活选择最优的模型和价格,助力AI体验的提升。', id: 'openrouter', diff --git a/src/server/routers/edge/config/__snapshots__/index.test.ts.snap b/src/server/routers/edge/config/__snapshots__/index.test.ts.snap index edc43ccce92e..c4d8548652f0 100644 --- a/src/server/routers/edge/config/__snapshots__/index.test.ts.snap +++ b/src/server/routers/edge/config/__snapshots__/index.test.ts.snap @@ -131,27 +131,23 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENROUTER_MODEL_ { "enabled": false, "enabledModels": [ - "google/gemma-7b-it:free", - "mistralai/mistral-7b-instruct:free", + "meta-llama/llama-3.1-8b-instruct:free", + "google/gemma-2-9b-it:free", ], "serverModelCards": [ { - "description": "Google 的 Gemma 7B 具有出色的计算效率,适适用于多种硬件架构,如GPU和TPU。", - "displayName": "Google: Gemma 7B (free)", + "description": "LLaMA 3.1 提供多语言支持,是业界领先的生成模型之一。", + "displayName": "Llama 3.1 8B (Free)", "enabled": true, - "functionCall": false, - "id": "google/gemma-7b-it:free", - "tokens": 8192, - "vision": false, + "id": "meta-llama/llama-3.1-8b-instruct:free", + "tokens": 32768, }, { - "description": "Mistral 7B Instruct 是一款高效的多语言模型,优化用于对话和问答,能在资源受限的环境中表现出色。", - "displayName": "Mistral 7B Instruct (free)", + "description": "Gemma 2 是Google轻量化的开源文本模型系列。", + "displayName": "Gemma 2 9B (Free)", "enabled": true, - "functionCall": false, - "id": "mistralai/mistral-7b-instruct:free", - "tokens": 32768, - "vision": false, + "id": "google/gemma-2-9b-it:free", + "tokens": 8192, }, ], } diff --git a/src/server/routers/edge/config/index.test.ts b/src/server/routers/edge/config/index.test.ts index 97468da95739..2347e13c81e6 100644 --- a/src/server/routers/edge/config/index.test.ts +++ b/src/server/routers/edge/config/index.test.ts @@ -132,7 +132,7 @@ describe('configRouter', () => { describe('OPENROUTER_MODEL_LIST', () => { it('custom deletion, addition, and renaming of models', async () => { process.env.OPENROUTER_MODEL_LIST = - '-all,+google/gemma-7b-it:free,+mistralai/mistral-7b-instruct:free'; + '-all,+meta-llama/llama-3.1-8b-instruct:free,+google/gemma-2-9b-it:free'; const response = await router.getGlobalConfig();