Skip to content

Commit eb96aa6

Browse files
committed
feat: update OpenRouter channel name and add model list for OpenRouter adaptor
1 parent c715f2b commit eb96aa6

File tree

5 files changed

+26
-3
lines changed

5 files changed

+26
-3
lines changed

relay/adaptor/openai/compatible.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/songquanpeng/one-api/relay/adaptor/mistral"
1313
"github.com/songquanpeng/one-api/relay/adaptor/moonshot"
1414
"github.com/songquanpeng/one-api/relay/adaptor/novita"
15+
"github.com/songquanpeng/one-api/relay/adaptor/openrouter"
1516
"github.com/songquanpeng/one-api/relay/adaptor/siliconflow"
1617
"github.com/songquanpeng/one-api/relay/adaptor/stepfun"
1718
"github.com/songquanpeng/one-api/relay/adaptor/togetherai"
@@ -76,6 +77,8 @@ func GetCompatibleChannelMeta(channelType int) (string, []string) {
7677
return "baiduv2", baiduv2.ModelList
7778
case channeltype.XunfeiV2:
7879
return "xunfeiv2", xunfeiv2.ModelList
80+
case channeltype.OpenRouter:
81+
return "openrouter", openrouter.ModelList
7982
default:
8083
return "openai", ModelList
8184
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package openrouter
2+
3+
var ModelList = []string{
4+
"openai/gpt-3.5-turbo",
5+
"openai/chatgpt-4o-latest",
6+
"openai/o1",
7+
"openai/o1-preview",
8+
"openai/o1-mini",
9+
"openai/o3-mini",
10+
"google/gemini-2.0-flash-001",
11+
"google/gemini-2.0-flash-thinking-exp:free",
12+
"google/gemini-2.0-flash-lite-preview-02-05:free",
13+
"google/gemini-2.0-pro-exp-02-05:free",
14+
"google/gemini-flash-1.5-8b",
15+
"anthropic/claude-3.5-sonnet",
16+
"anthropic/claude-3.5-haiku",
17+
"deepseek/deepseek-r1:free",
18+
"deepseek/deepseek-r1",
19+
"qwen/qwen-vl-plus:free",
20+
}

web/air/src/constants/channel.constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const CHANNEL_OPTIONS = [
3535
{ key: 8, text: '自定义渠道', value: 8, color: 'pink' },
3636
{ key: 22, text: '知识库:FastGPT', value: 22, color: 'blue' },
3737
{ key: 21, text: '知识库:AI Proxy', value: 21, color: 'purple' },
38-
{ key: 20, text: '代理:OpenRouter', value: 20, color: 'black' },
38+
{key: 20, text: 'OpenRouter', value: 20, color: 'black'},
3939
{ key: 2, text: '代理:API2D', value: 2, color: 'blue' },
4040
{ key: 5, text: '代理:OpenAI-SB', value: 5, color: 'brown' },
4141
{ key: 7, text: '代理:OhMyGPT', value: 7, color: 'purple' },

web/berry/src/constants/ChannelConstants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export const CHANNEL_OPTIONS = {
217217
},
218218
20: {
219219
key: 20,
220-
text: '代理:OpenRouter',
220+
text: 'OpenRouter',
221221
value: 20,
222222
color: 'success'
223223
},

web/default/src/constants/channel.constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const CHANNEL_OPTIONS = [
6767
{key: 8, text: '自定义渠道', value: 8, color: 'pink'},
6868
{key: 22, text: '知识库:FastGPT', value: 22, color: 'blue'},
6969
{key: 21, text: '知识库:AI Proxy', value: 21, color: 'purple'},
70-
{key: 20, text: '代理:OpenRouter', value: 20, color: 'black'},
70+
{key: 20, text: 'OpenRouter', value: 20, color: 'black'},
7171
{key: 2, text: '代理:API2D', value: 2, color: 'blue'},
7272
{key: 5, text: '代理:OpenAI-SB', value: 5, color: 'brown'},
7373
{key: 7, text: '代理:OhMyGPT', value: 7, color: 'purple'},

0 commit comments

Comments
 (0)