feat: update OpenRouter channel name and add model list for OpenRouter adaptor

This commit is contained in:
JustSong 2025-02-11 00:20:55 +08:00
parent c715f2bc1d
commit eb96aa635e
5 changed files with 26 additions and 3 deletions

View File

@ -12,6 +12,7 @@ import (
"github.com/songquanpeng/one-api/relay/adaptor/mistral"
"github.com/songquanpeng/one-api/relay/adaptor/moonshot"
"github.com/songquanpeng/one-api/relay/adaptor/novita"
"github.com/songquanpeng/one-api/relay/adaptor/openrouter"
"github.com/songquanpeng/one-api/relay/adaptor/siliconflow"
"github.com/songquanpeng/one-api/relay/adaptor/stepfun"
"github.com/songquanpeng/one-api/relay/adaptor/togetherai"
@ -76,6 +77,8 @@ func GetCompatibleChannelMeta(channelType int) (string, []string) {
return "baiduv2", baiduv2.ModelList
case channeltype.XunfeiV2:
return "xunfeiv2", xunfeiv2.ModelList
case channeltype.OpenRouter:
return "openrouter", openrouter.ModelList
default:
return "openai", ModelList
}

View File

@ -0,0 +1,20 @@
package openrouter
var ModelList = []string{
"openai/gpt-3.5-turbo",
"openai/chatgpt-4o-latest",
"openai/o1",
"openai/o1-preview",
"openai/o1-mini",
"openai/o3-mini",
"google/gemini-2.0-flash-001",
"google/gemini-2.0-flash-thinking-exp:free",
"google/gemini-2.0-flash-lite-preview-02-05:free",
"google/gemini-2.0-pro-exp-02-05:free",
"google/gemini-flash-1.5-8b",
"anthropic/claude-3.5-sonnet",
"anthropic/claude-3.5-haiku",
"deepseek/deepseek-r1:free",
"deepseek/deepseek-r1",
"qwen/qwen-vl-plus:free",
}

View File

@ -35,7 +35,7 @@ export const CHANNEL_OPTIONS = [
{ key: 8, text: '自定义渠道', value: 8, color: 'pink' },
{ key: 22, text: '知识库FastGPT', value: 22, color: 'blue' },
{ key: 21, text: '知识库AI Proxy', value: 21, color: 'purple' },
{ key: 20, text: '代理:OpenRouter', value: 20, color: 'black' },
{key: 20, text: 'OpenRouter', value: 20, color: 'black'},
{ key: 2, text: '代理API2D', value: 2, color: 'blue' },
{ key: 5, text: '代理OpenAI-SB', value: 5, color: 'brown' },
{ key: 7, text: '代理OhMyGPT', value: 7, color: 'purple' },

View File

@ -217,7 +217,7 @@ export const CHANNEL_OPTIONS = {
},
20: {
key: 20,
text: '代理:OpenRouter',
text: 'OpenRouter',
value: 20,
color: 'success'
},

View File

@ -67,7 +67,7 @@ export const CHANNEL_OPTIONS = [
{key: 8, text: '自定义渠道', value: 8, color: 'pink'},
{key: 22, text: '知识库FastGPT', value: 22, color: 'blue'},
{key: 21, text: '知识库AI Proxy', value: 21, color: 'purple'},
{key: 20, text: '代理:OpenRouter', value: 20, color: 'black'},
{key: 20, text: 'OpenRouter', value: 20, color: 'black'},
{key: 2, text: '代理API2D', value: 2, color: 'blue'},
{key: 5, text: '代理OpenAI-SB', value: 5, color: 'brown'},
{key: 7, text: '代理OhMyGPT', value: 7, color: 'purple'},