feat: sync remaining channel and relay updates
This commit is contained in:
@@ -301,24 +301,27 @@ func (info *RelayInfo) ToString() string {
|
||||
|
||||
// 定义支持流式选项的通道类型
|
||||
var streamSupportedChannels = map[int]bool{
|
||||
constant.ChannelTypeOpenAI: true,
|
||||
constant.ChannelTypeAnthropic: true,
|
||||
constant.ChannelTypeAws: true,
|
||||
constant.ChannelTypeGemini: true,
|
||||
constant.ChannelCloudflare: true,
|
||||
constant.ChannelTypeAzure: true,
|
||||
constant.ChannelTypeVolcEngine: true,
|
||||
constant.ChannelTypeOllama: true,
|
||||
constant.ChannelTypeXai: true,
|
||||
constant.ChannelTypeDeepSeek: true,
|
||||
constant.ChannelTypeBaiduV2: true,
|
||||
constant.ChannelTypeZhipu_v4: true,
|
||||
constant.ChannelTypeAli: true,
|
||||
constant.ChannelTypeSubmodel: true,
|
||||
constant.ChannelTypeCodex: true,
|
||||
constant.ChannelTypeMoonshot: true,
|
||||
constant.ChannelTypeMiniMax: true,
|
||||
constant.ChannelTypeSiliconFlow: true,
|
||||
constant.ChannelTypeOpenAI: true,
|
||||
constant.ChannelTypeCodexCLIProxy: true,
|
||||
constant.ChannelTypeGeminiCLIProxy: true,
|
||||
constant.ChannelTypeAnthropic: true,
|
||||
constant.ChannelTypeClaudeCodeCLIProxy: true,
|
||||
constant.ChannelTypeAws: true,
|
||||
constant.ChannelTypeGemini: true,
|
||||
constant.ChannelCloudflare: true,
|
||||
constant.ChannelTypeAzure: true,
|
||||
constant.ChannelTypeVolcEngine: true,
|
||||
constant.ChannelTypeOllama: true,
|
||||
constant.ChannelTypeXai: true,
|
||||
constant.ChannelTypeDeepSeek: true,
|
||||
constant.ChannelTypeBaiduV2: true,
|
||||
constant.ChannelTypeZhipu_v4: true,
|
||||
constant.ChannelTypeAli: true,
|
||||
constant.ChannelTypeSubmodel: true,
|
||||
constant.ChannelTypeCodex: true,
|
||||
constant.ChannelTypeMoonshot: true,
|
||||
constant.ChannelTypeMiniMax: true,
|
||||
constant.ChannelTypeSiliconFlow: true,
|
||||
}
|
||||
|
||||
func GenRelayInfoWs(c *gin.Context, ws *websocket.Conn) *RelayInfo {
|
||||
|
||||
@@ -33,6 +33,15 @@ func GetFullRequestURL(baseURL string, requestURL string, channelType int) strin
|
||||
fullRequestURL = fmt.Sprintf("%s%s", baseURL, strings.TrimPrefix(requestURL, "/openai/deployments"))
|
||||
}
|
||||
}
|
||||
|
||||
if channelType == constant.ChannelTypeCodexCLIProxy ||
|
||||
channelType == constant.ChannelTypeGeminiCLIProxy {
|
||||
trimmedRequestURL := strings.TrimPrefix(requestURL, "/v1")
|
||||
if trimmedRequestURL == "" {
|
||||
trimmedRequestURL = "/"
|
||||
}
|
||||
fullRequestURL = fmt.Sprintf("%s%s", baseURL, trimmedRequestURL)
|
||||
}
|
||||
return fullRequestURL
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user