diff --git a/common/api_type.go b/common/api_type.go index 39c1fe9a5406..c93dcd1f6a8a 100644 --- a/common/api_type.go +++ b/common/api_type.go @@ -75,6 +75,8 @@ func ChannelType2APIType(channelType int) (int, bool) { apiType = constant.APITypeReplicate case constant.ChannelTypeCodex: apiType = constant.APITypeCodex + case constant.ChannelTypeAvian: + apiType = constant.APITypeOpenAI } if apiType == -1 { return constant.APITypeOpenAI, false diff --git a/constant/channel.go b/constant/channel.go index 48502bedc52c..da6786e6e40b 100644 --- a/constant/channel.go +++ b/constant/channel.go @@ -55,6 +55,7 @@ const ( ChannelTypeSora = 55 ChannelTypeReplicate = 56 ChannelTypeCodex = 57 + ChannelTypeAvian = 58 ChannelTypeDummy // this one is only for count, do not add any channel after this ) @@ -118,6 +119,7 @@ var ChannelBaseURLs = []string{ "https://api.openai.com", //55 "https://api.replicate.com", //56 "https://chatgpt.com", //57 + "https://api.avian.io", //58 } var ChannelTypeNames = map[int]string{ @@ -175,6 +177,7 @@ var ChannelTypeNames = map[int]string{ ChannelTypeSora: "Sora", ChannelTypeReplicate: "Replicate", ChannelTypeCodex: "Codex", + ChannelTypeAvian: "Avian", } func GetChannelTypeName(channelType int) string { diff --git a/relay/common/relay_info.go b/relay/common/relay_info.go index 8b0789c0ddd3..e8df4074194e 100644 --- a/relay/common/relay_info.go +++ b/relay/common/relay_info.go @@ -318,6 +318,7 @@ var streamSupportedChannels = map[int]bool{ constant.ChannelTypeMoonshot: true, constant.ChannelTypeMiniMax: true, constant.ChannelTypeSiliconFlow: true, + constant.ChannelTypeAvian: true, } func GenRelayInfoWs(c *gin.Context, ws *websocket.Conn) *RelayInfo { diff --git a/web/src/constants/channel.constants.js b/web/src/constants/channel.constants.js index 9fa78779de8f..e57ab71e8565 100644 --- a/web/src/constants/channel.constants.js +++ b/web/src/constants/channel.constants.js @@ -189,6 +189,11 @@ export const CHANNEL_OPTIONS = [ color: 'blue', label: 'Codex (OpenAI OAuth)', }, + { + value: 58, + color: 'green', + label: 'Avian', + }, ]; // Channel types that support upstream model list fetching in UI.