feeeei
d05e8ef033
fix(usage): 按账户筛选时模型与端点分布的实际扣费不再替换为账号成本
模型统计和端点统计在仅按 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 口径不变。
2026-11-14 21:17:57 +08:00
..
2026-11-01 23:52:35 +08:00
2026-07-01 11:32:22 +08:00
2026-11-09 17:29:00 +09:00
2026-11-10 22:24:20 +08:00
2026-11-10 22:24:20 +08:00
2026-08-07 20:49:39 +08:00
2026-02-28 15:01:20 +08:00
2026-10-30 09:06:51 +08:00
2026-10-28 16:00:21 +08:00
2026-10-31 11:45:55 +08:00
2026-07-14 01:29:30 +08:00
2026-11-07 01:52:36 +08:00
2026-08-06 20:34:37 +08:00
2026-07-18 00:11:18 +08:00
2026-08-01 15:03:59 +08:00
2026-11-07 14:06:18 +08:00
2026-05-14 11:46:24 +08:00
2026-10-23 15:24:24 +08:00
2026-03-02 16:04:20 +08:00
2026-08-03 19:59:58 +08:00
2026-08-07 16:29:48 +08:00
2026-09-05 16:05:17 +08:00
2026-10-23 15:24:24 +08:00
2026-08-24 12:21:06 +08:00
2026-11-09 10:27:08 +08:00
2026-07-02 16:11:07 +08:00
2026-07-16 09:51:41 +08:00
2026-10-02 13:51:58 +08:00
2026-11-14 21:17:57 +08:00
2026-04-14 12:19:44 +08:00
2026-10-06 22:53:10 +08:00