feat: 支持模型尊享标识并统一扣减尊享用量逻辑

新增模型是否为尊享的标识字段 IsPremium,并在网关层透传到模型描述。
使用模型描述中的 IsPremium 统一判断是否扣减尊享 token,用以替代多处重复的数据库查询。
同时整理了相关代码与注释,使尊享用量扣减逻辑更加集中和清晰。
This commit is contained in:
ccnetcore
2026-01-04 00:08:08 +08:00
parent 158226601b
commit 9c058e9545
2 changed files with 33 additions and 42 deletions

View File

@@ -61,4 +61,9 @@ public class AiModelDescribe
/// 模型倍率
/// </summary>
public decimal Multiplier { get; set; }
/// <summary>
/// 是否为尊享模型
/// </summary>
public bool IsPremium { get; set; }
}