feat: sync remaining channel and relay updates
This commit is contained in:
@@ -75,6 +75,12 @@ func ChannelType2APIType(channelType int) (int, bool) {
|
||||
apiType = constant.APITypeReplicate
|
||||
case constant.ChannelTypeCodex:
|
||||
apiType = constant.APITypeCodex
|
||||
case constant.ChannelTypeCodexCLIProxy:
|
||||
apiType = constant.APITypeOpenAI
|
||||
case constant.ChannelTypeClaudeCodeCLIProxy:
|
||||
apiType = constant.APITypeAnthropic
|
||||
case constant.ChannelTypeGeminiCLIProxy:
|
||||
apiType = constant.APITypeOpenAI
|
||||
}
|
||||
if apiType == -1 {
|
||||
return constant.APITypeOpenAI, false
|
||||
|
||||
@@ -24,6 +24,7 @@ var defaultEndpointInfoMap = map[constant.EndpointType]EndpointInfo{
|
||||
constant.EndpointTypeGemini: {Path: "/v1beta/models/{model}:generateContent", Method: "POST"},
|
||||
constant.EndpointTypeJinaRerank: {Path: "/v1/rerank", Method: "POST"},
|
||||
constant.EndpointTypeImageGeneration: {Path: "/v1/images/generations", Method: "POST"},
|
||||
constant.EndpointTypeImageEdit: {Path: "/v1/images/edits", Method: "POST"},
|
||||
constant.EndpointTypeEmbeddings: {Path: "/v1/embeddings", Method: "POST"},
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ func GetEndpointTypesByChannelType(channelType int, modelName string) []constant
|
||||
case constant.ChannelTypeAws:
|
||||
fallthrough
|
||||
case constant.ChannelTypeAnthropic:
|
||||
case constant.ChannelTypeClaudeCodeCLIProxy:
|
||||
endpointTypes = []constant.EndpointType{constant.EndpointTypeAnthropic, constant.EndpointTypeOpenAI}
|
||||
case constant.ChannelTypeVertexAi:
|
||||
fallthrough
|
||||
|
||||
Reference in New Issue
Block a user