mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-17 01:06:37 +08:00
feat: update OpenRouter channel name and add model list for OpenRouter adaptor
This commit is contained in:
parent
c715f2bc1d
commit
eb96aa635e
@ -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
|
||||
}
|
||||
|
20
relay/adaptor/openrouter/constants.go
Normal file
20
relay/adaptor/openrouter/constants.go
Normal 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",
|
||||
}
|
@ -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' },
|
||||
|
@ -217,7 +217,7 @@ export const CHANNEL_OPTIONS = {
|
||||
},
|
||||
20: {
|
||||
key: 20,
|
||||
text: '代理:OpenRouter',
|
||||
text: 'OpenRouter',
|
||||
value: 20,
|
||||
color: 'success'
|
||||
},
|
||||
|
@ -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'},
|
||||
|
Loading…
Reference in New Issue
Block a user