Files
sub2api/frontend/src
erio a9117600a5 feat(channel): 渠道管理系统 — 多模式定价 + 统一计费解析
新增渠道管理功能,支持三种计费模式(Token 区间/按次/图片),
统一定价解析链(Channel → LiteLLM → Fallback),
无渠道配置时保持原有计费逻辑不变。

Backend:
- 新增 channels/channel_groups/channel_model_pricing/channel_pricing_intervals 表
- ChannelService: atomic.Value + singleflight 缓存,通配符模型匹配
- ModelPricingResolver: 统一定价解析器
- BillingService: CalculateCostUnified 统一计费入口
- 完整输入验证(BillingMode/价格非负/名称长度)
- 33 个单元测试覆盖核心路径

Frontend:
- ChannelsView.vue: 渠道 CRUD 列表页
- PricingEntryCard.vue + IntervalRow.vue: 定价编辑组件
- 支持三种计费模式切换 + 区间编辑
2026-03-30 02:03:06 +08:00
..
2025-12-18 14:26:55 +08:00