feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+2 -11
View File
@@ -5,7 +5,6 @@ import (
"strings"
"github.com/QuantumNous/new-api/common"
"github.com/QuantumNous/new-api/constant"
"github.com/QuantumNous/new-api/pkg/billingexpr"
relaycommon "github.com/QuantumNous/new-api/relay/common"
"github.com/QuantumNous/new-api/relaykit/dto"
@@ -42,19 +41,11 @@ func ResolveImageBillingRequestInput(c *gin.Context, info *relaycommon.RelayInfo
if !ok {
return input, nil
}
channelType := common.GetContextKeyInt(c, constant.ContextKeyChannelType)
if info.ChannelMeta != nil {
channelType = info.ChannelType
}
count, err := request.ImageCount(channelType == constant.ChannelTypeAli)
count, err := request.ImageCount(false)
if err != nil {
return input, err
}
topLevelCount, err := request.ImageCount(false)
if err != nil {
return input, err
}
body := map[string]any{"model": request.Model, "n": topLevelCount, "size": request.Size, "quality": request.Quality}
body := map[string]any{"model": request.Model, "n": count, "size": request.Size, "quality": request.Quality}
if request.BillingParameters != nil {
body["parameters"] = request.BillingParameters
}