自定义模型服务的费用估算与实际计费不一致,建议仅统计 Token
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 401
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: zhufeng
**客户端版本**: 0.1.50
---
## 现象
接入自定义模型服务后,Cindy 仍展示人民币费用估算,但该金额与模型服务商针对同一任务、同一时段的实际计费明显不一致,容易让用户误判真实成本。
## 复现步骤
1. 在 Cindy 中接入自定义模型服务。
2. 选择该服务提供的模型并执行一个任务。
3. 查看 Cindy 显示的“本任务已用”和“最近一轮用户请求累计”费用。
4. 查看模型服务商后台中同一任务、同一时段的计费。
5. 对比两边的费用数据。
## 期望行为
对于用户自行接入的模型服务,Cindy 默认不估算货币费用,仅准确展示输入 Token、输出 Token 和总 Token 数,避免因服务商定价、路由或计费规则不同而产生误导。
## 实际行为
Cindy 展示了与服务商实际账单明显不一致的费用估算。
经用户同意公开的脱敏诊断摘要:
- 模型标识:`google/gemini-3.7-flash[1m]`
- 服务商后台:总费用约 **$4.8821**,其中输入约 **$3.6764**、输出约 **$1.2058**
- Cindy:本任务已用约 **¥115.97**,最近一轮约 **¥5.78**
- Cindy 显示 Token:共约 **161.7k**,输入约 **158.9k**、输出约 **2.7k**
- 缓存拆分:读取 0、写入 0
- 上述数据对应同一任务、同一时段
## 复现频率
每次使用该自定义模型服务时都会出现。
## 已尝试
尚未尝试其他处理方式。
---
**OS**: win32 x64 (10.0.26200)
**界面语言**: zh-CN
Contributor guide
Research direction
No source file or test is named in the report. Start by locating the code that calculates and displays task and recent-request costs, then trace how custom model services are identified and how token counts are recorded. Done means custom services show input, output, and total tokens without a misleading currency estimate, with coverage for the reported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100