mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-12-05 08:05:12 +00:00
模型统计和端点统计在仅按 account_id 过滤(无 user_id/api_key_id)时, 把 actual_cost 换成了账号成本 SUM(COALESCE(account_stats_cost, total_cost) * COALESCE(account_rate_multiplier, 1));展开后的用户明细与分组分布用的是 真实 SUM(actual_cost),于是模型行「实际」会小于其下单个用户行的「实际」, 且与同页「成本」列数值相同。 - actual_cost 统一为用户实际扣费,账号成本由 account_cost 承载; EndpointStat 新增 account_cost,端点分布表增加「成本」列,用户侧 /api/v1/usage/stats 清零该字段、用户页隐藏该列 - Gemini 配额用量(geminiAggregateUsage、GetGeminiUsageTotalsBatch) 显式按账号成本累计,账号用量窗口展示不变 接口口径变化:仅按账户过滤时,/admin/dashboard/models、/admin/usage/stats 的 endpoints/upstream_endpoints/endpoint_paths、/admin/accounts/:id/stats 的 models/endpoints 中 actual_cost 由账号成本改为用户实际扣费,账号成本改看 account_cost;/admin/accounts/:id/stats 的 history/summary 口径不变。