中文
环境:[email protected](0.8.1 发布包里的 lib/plans.js 与之逐字节相同,升级不会改变这一行为)。
现象:设置 → 插件 →「订阅档位」的 GOAT 行显示 GOAT · 月费 $10 / 月 · 5 小时窗口 $14 · 每周窗口 $35 · 月度余额 $70;「用量与提醒」卡也把窗口上限写成 上限 $14 / 上限 $35,月度写成 可用 $67.87 · 本期已用 $2.13。
这些数字的单位其实是 credits,不是美元:
- 官方 Usage limits 原文:“GOAT is simpler than it looks: you can use 14 credits in any 5 hours and 35 in any 7 days … worth up to $20 / $50 of usage on a $100 model like Ling 3.1 Flash, or $14 / $35 on a $70 model like GLM-5.2.”
- GOAT 的月度池就是 70 credits(14 / 35 正好是它的 20% / 50%)。Pricing & Limits 把它表述成 “Up to $100 of usage”,GOAT 页 说明 “$10 buys up to $100 of credits”,模型表再给出这 70 credits 在每个模型上的美元折算额:DeepSeek V4.1 Flash
$80、GLM-5.2 $70、Ling 3.1 Flash $100。
账户接口同样是 credits,不是美元:GET /alpha/billing/credits 返回 fiveHour.cap = 14、weekly.cap = 35;两次采样里 credits.monthlyCredits(68.0020559627 / 67.8708837992)与同一时刻 windowLimits.weekly.used(1.9979440373 / 2.1291162008)相加精确等于 70.0000000000。同期 GET /alpha/usage/summary.totalCost 只有 $2.004,说明窗口与余额记的是 credits,美元成本是另一套单位。
影响:lib/client.js 的 quotaLine() / quotaValue() 和 MeterRow 的 detail 都走 formatDollars(),lib/usage.js 的 creditLines() 也一样,于是 credits 数量被渲染成 $70 / $14 / $35 / $68.00 monthly。用户在官网模型表里看到自己模型 deepseek-v4.1-flash 的 $80,卡片却写 $70,很自然会判断成额度缩水(我最初就这样误读了)。
建议:
- credits 与美元分开渲染:窗口和月度显示
14 / 35 / 70 credits(本地化词条可用“额度点”),只有真正的美元字段(totalCost)用 $。
usage.js 的 creditLines() 输出 balance: $68.00 monthly … 同样要标成 credits。
commandcode_usage 工具返回值一并修正——模型读到的现在也是 $。
- 若确实要显示美元价值,只能引用官方模型表的逐模型折算额,并且必须标注抓取日期;不建议作为默认展示。
需要的话我可以提 PR(plans.js 保持不变,改 client.js / usage.js 的单位渲染 + locale/*.json 文案 + 测试)。
English
Environment: [email protected] on DSH Desktop; lib/plans.js is byte-identical in the 0.8.1 release tarball, so upgrading does not change this.
Observed: the settings card's GOAT row renders 月费 $10 / 月 · 5 小时窗口 $14 · 每周窗口 $35 · 月度余额 $70, and the usage card prints the same caps as 上限 $14 / 上限 $35 plus 可用 $67.87 · 本期已用 $2.13.
Those figures are credits, not dollars:
- The official Usage limits page says: “GOAT is simpler than it looks: you can use 14 credits in any 5 hours and 35 in any 7 days … worth up to $20 / $50 of usage on a $100 model like Ling 3.1 Flash, or $14 / $35 on a $70 model like GLM-5.2.”
- The GOAT monthly pool is 70 credits (14 / 35 are 20% / 50% of it). Pricing & Limits phrases it as “Up to $100 of usage”, the GOAT page says “$10 buys up to $100 of credits”, and its model table gives the dollar value of those 70 credits per model: DeepSeek V4.1 Flash
$80, GLM-5.2 $70, Ling 3.1 Flash $100.
The account API is in credits too: GET /alpha/billing/credits returns fiveHour.cap = 14 and weekly.cap = 35; credits.monthlyCredits (68.0020559627 then 67.8708837992) plus the matching windowLimits.weekly.used (1.9979440373 then 2.1291162008) equals exactly 70.0000000000 in both samples, while GET /alpha/usage/summary.totalCost for the same period is only $2.004. So the windows and the balance are credit amounts; the dollar cost is a separate unit.
Impact: quotaLine() / quotaValue() and the MeterRow detail in lib/client.js all go through formatDollars(), and so does creditLines() in lib/usage.js, so credit counts render as $70 / $14 / $35 / $68.00 monthly. A reader comparing the official model table's deepseek-v4.1-flash … $80 with the card's $70 reasonably concludes their quota shrank (that was my first reading too).
Suggested fix:
- Render credits and dollars separately: show
14 / 35 / 70 credits for the windows and the monthly pool (a localized word such as “额度点” works), and keep $ only for real dollar fields such as totalCost.
creditLines() in usage.js has the same issue (balance: $68.00 monthly …).
- The
commandcode_usage tool output needs the same correction — a model currently reads $ too.
- If dollar values are shown at all, they must come from the official model table’s per-model allowances and carry a capture date; it should not be the default.
Happy to open a PR (keep plans.js as is; fix the unit rendering in client.js / usage.js, the locale/*.json copy, and tests).