Feature Request: 用量与计费明细仪表盘 (Usage & Billing Dashboard)
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 401
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
## 需求描述 / Feature Request
希望在 Cindy 中增加一个用量和计费的可视化展示页面,方便用户了解不同模型的使用情况和花费,追踪 token 消耗和成本。
## 期望功能 / Desired Features
### 1. 模型维度用量与计费统计 / Per-model usage & cost breakdown
- 展示每个使用过的模型(Claude Opus/Sonnet/Haiku, GPT-5, Codex 等)的详细用量:
- 输入 token 总数、输出 token 总数、总 token 数
- 对应产生的费用(按输入/输出分别计费)
- 请求次数、平均每次请求 token/费用
### 2. 时间维度汇总统计 / Time-range aggregation
支持按不同时间周期查看用量:
- 按天 (Daily)
- 按周 (Weekly)
- 按月 (Monthly)
- 支持自定义时间范围筛选
### 3. 缓存命中情况展示 / Cache hit metrics
- 提示词缓存(Prompt Cache)的命中次数/比例
- 缓存命中节省的 token 数和费用
- 缓存写入/读取的统计数据
### 4. 其他期望 / Nice to have
- 趋势图(折线图展示每日用量/费用变化)
- 按会话/agent 分类统计
- 费用预估和告警阈值设置
- 数据导出功能(CSV/JSON)
## 背景 / Background
目前多模型切换使用时,很难直观了解每个模型的具体消耗和花费,尤其是缓存命中带来的成本节省没有可视化,不利于成本控制和使用优化。
## 参考 / References
类似实现:OpenAI Usage dashboard、Anthropic Console Usage 页
Contributor guide
Research direction
Start by locating how Cindy currently records usage, token counts, costs, and cache events, then find the existing UI entry point for a new dashboard. The issue names no files or implementation boundary, so first confirm which metrics, time ranges, charts, alerts, and export options are in scope; done means the agreed dashboard displays the selected usage and billing data accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- analytics, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100