CommandCodeAI / CommandCodeAI/command-code
Bug: Usage data discrepancy between CLI /usage command and web dashboard
还没有人认领这个 Issue。
- 主要语言
- 没有语言数据
- 星标
- 4k
- 派生
- 350
- PR 合并指标
- 30 天内没有已合并 PR
描述
Bug: Usage data discrepancy between CLI /usage command and web dashboard
Summary
There is a significant discrepancy between the usage data shown by the CLI /usage command and the web dashboard (https://commandcode.ai/settings/usage). The CLI shows one model as the most used, while the web dashboard shows a completely different model.
Environment
- Command Code version: 0.30.1
- OS: Windows
- Shell: PowerShell
Steps to Reproduce
- Use Command Code with multiple models over several sessions
- Run
/usagein the CLI to see usage summary - Check the web dashboard at https://commandcode.ai/settings/usage
- Compare the model usage breakdown
Expected Behavior
The usage data should be consistent between the CLI and web dashboard. Both should show the same model as the most used.
Actual Behavior
CLI /usage command shows:
- moonshotai/Kimi-K2.5: 154 requests, $0.4753
- xiaomi/mimo-v2.5-pro: 316 requests, $0.4663
- deepseek/deepseek-v4-pro: 81 requests, $0.4430
- MiniMaxAI/MiniMax-M2.5: 258 requests, $0.0805
Web dashboard shows:
- xiaomi/mimo-v2.5-pro: Most used model (expected)
- moonshotai/Kimi-K2.5: Only 3 requests (discrepancy)
The CLI shows Kimi-K2.5 as the most used model (154 requests), but the web dashboard shows it was only used 3 times. The web dashboard correctly shows MiMo 2.5 Pro as the most used model.
Analysis
This appears to be a data synchronization or attribution issue. The CLI may be:
- Aggregating data differently than the web dashboard
- Including background/internal model calls (as mentioned in #440) in the CLI summary but not in the web dashboard
- Having a caching or sync issue between local and server-side data
Related Issues
- #440 — "Background model MiniMax-M2.5 is expensive and uncontrollable" (mentions Kimi-K2.5 background usage)
- #326 — "Unexpected usage of multiple models during a single session" (closed as non-issue, but same underlying problem)
- This discrepancy may be related to the background model usage discussed in #440
Additional Notes
- The web dashboard appears to show the correct user-selected model usage
- The CLI may be including background/internal model calls in its summary
- This discrepancy makes it difficult to accurately track actual model usage and costs
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,按照 issue 中的复现步骤,将 CLI /usage 的聚合结果与 Web 仪表板的模型明细进行比较。检查 #440 中提到的后台或内部模型调用是否包含在 CLI 中但被仪表板排除;当两个界面报告一致的模型数量和成本时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 领域
- analytics, cli, web-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100