feat: add New API channel support

This commit is contained in:
CaIon
2026-07-27 15:20:19 +08:00
parent bc14c18f60
commit 398cdafecf
21 changed files with 408 additions and 128 deletions
+14
View File
@@ -79,9 +79,23 @@ func ChannelType2APIType(channelType int) (int, bool) {
apiType = constant.APITypeAdvancedCustom
case constant.ChannelTypeSub2API:
apiType = constant.APITypeSub2API
case constant.ChannelTypeNewAPI:
apiType = constant.APITypeNewAPI
}
if apiType == -1 {
return constant.APITypeOpenAI, false
}
return apiType, true
}
func IsResponsesCompactAPIType(apiType int) bool {
switch apiType {
case constant.APITypeOpenAI,
constant.APITypeCodex,
constant.APITypeSub2API,
constant.APITypeNewAPI:
return true
default:
return false
}
}