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
+4
View File
@@ -481,6 +481,10 @@ func validateChannel(channel *model.Channel, isAdd bool) error {
return fmt.Errorf("渠道额外设置[channel setting] 格式错误:%s", err.Error())
}
if channel.Type == constant.ChannelTypeNewAPI && strings.TrimSpace(channel.GetBaseURL()) == "" {
return fmt.Errorf("New API channel base URL cannot be empty")
}
// 如果是添加操作,检查 channel 和 key 是否为空
if isAdd {
if channel.Key == "" {