[Idea] First-class subscription quota windows (5-hour / weekly / monthly) for Coding Plan providers #6895
nanami-0713
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context
More and more DSH instances are pointed at subscription plans (GLM Coding Plan, Kimi, …) instead of pay-as-you-go API keys. These plans don't meter like API bills: they use rolling windows — 5-hour, weekly, monthly / billing period — with provider-specific semantics: unused quota doesn't carry over, plan changes reset the clock, and the API side still prices by model × pricing era × peak/off-peak.
DSH's usage accounting today is request- and session-scoped (token-meter, session stats). The plan window exists nowhere in the product — so users find out about limits only when a call dies with 429/403, and per #3338 / #5715 those failures aren't even classified clearly when they do.
Proposal: treat quota windows as first-class
Why core, not only plugins: window aggregation needs request-time hooks (model routing, subagent fan-out) that plugins can only observe after the fact — and every budget/dashboard plugin would benefit from one shared notion of "the window I'm spending against".
Reference implementation
I maintain dsh-usage (npm:
@hsinsekai-nanami/dsh-usage), which implements GLM/Kimi adapters with 5-hour/weekly/monthly progress badges, per-request pricing by model × pricing era × peak/off-peak, and session + global dashboards. Happy to contribute the window/adapter design if this direction interests the team.Related: #5624 (expose per-session token/cost in a documented form — still unanswered), #1280 (simulating vendor subscription quotas), #3338, #5715.
中文版
@hsinsekai-nanami/dsh-usage)已实现 GLM/Kimi 适配器、5 小时/周/月进度条与逐请求计价,愿意贡献窗口/适配器设计。All reactions