fix: 支持零价系统渠道模型分发 (#303)

* docs(spec): 模型计费 - 记录零价免费模型设计

* fix(billing): 模型定价 - 支持零价免费模型

* fix(config): 系统模型目录 - 支持零价模型
This commit is contained in:
ahyang authored and GitHub committed 2026-08-24 21:32:56 +08:00
1 parent 76035451f1
commit a23e399ccf
8 files changed
+79 -28

No files matched your search

+1 -1
View File
@@ -144,7 +144,7 @@ func (s *Service) sanitizeChannelModel(cm *model.ChannelModel) PublicChannelMode
// 转换为公开的价格档
publicTiers := make([]PublicChannelModelPriceTier, 0, len(priceTiers))
for _, tier := range priceTiers {
if !tier.Enabled || !ValidatePriceTierPrice(&tier, cm.Capability, cm.Protocol) {
if !tier.Enabled || !tier.PriceConfigured || !ValidatePriceTierPrice(&tier, cm.Capability, cm.Protocol) {
continue
}
publicTiers = append(publicTiers, PublicChannelModelPriceTier{