Repository navigation
Closed
Description
Before submitting
- I searched existing issues and did not find a duplicate (checked closed unmerged PRs feat(usage): include Kimi Code activity #7936, feat(server): show Kimi For Coding plan limits for Claude instances #8485, and feat(server): show Kimi Code plan limits on Claude relay instances #13587, as well as fix(usage): show Devin in subscription Limits #26381 and Antigravity quota exhaustion (HTTP 429) finishes the turn as completed instead of showing the usage-limit banner #28658).
- I included enough detail to reproduce or investigate the problem.
Area
apps/server, apps/web, apps/mobile (Usage & Subscription Limits / ACP Registry Kimi provider)
Problem
When using Kimi (acpRegistry_kimi_cli / Kimi Code CLI 2.4.1 or ACP Registry kimi 1.52.0), T3 Code 0.1.6 has no Usage Limit UI and no Kimi usage integration across three surfaces:
Usage -> Limits(mod+u->l) completely omits Kimi:
Even whenacpRegistry_kimi_cliis enabled, installed, andstatus: "ready", Kimi does not appear in Subscription Limits at all — neither live rolling quota bars (5-hourwindow,7-daywindow, monthly code/total quota, and Booster extra-usage wallet) nor even an external Manage usage fallback link (https://www.kimi.com/membership/subscription?tab=quota, compare fix(usage): show Devin in subscription Limits #26381 for Devin).- 5-hour quota exhaustion (
HTTP 429) has no usage-limit banner / reset timer / snooze integration:
When a Kimi Coding subscription hits its 5-hour rolling window,kimireturns:T3 Code lacks Kimi quota-window awareness forprovider.api_error: 429 You've reached your 5-hour usage limit. Your quota will reset when the current 5-hour window ends. To continue now, purchase extra usage or upgrade your plan: https://www.kimi.com/membership/subscription?tab=quotasnoozeLimitedThreads/autoResumeLimitedThreadsand model-picker out-of-quota indicators. Usage -> Tokens / Costomits Kimi local session transcripts:
usage-scan-cache-v10.jsonscans~/.claude,~/.codex,~/.grok, and~/.pi, but does not scan Kimi Code's~/.kimi-code/sessions(agents/*/wire.jsonlusage.recordevents) or legacy~/.kimi/sessions. (Previous PRs feat(usage): include Kimi Code activity #7936 and feat(server): show Kimi Code plan limits on Claude relay instances #13587 were closed unmerged, and feat(server): show Kimi Code plan limits on Claude relay instances #13587 only targetedclaudeAgentrelay instances rather thanacpRegistryKimi instances.)
Expected behavior
Usage -> Limitsshows Kimi subscription quotas for enabledacpRegistryKimi instances (supporting both~/.kimi-code/for Kimi Code CLI2.xand~/.kimi/for legacykimi-cli1.x, plusKIMI_CODE_HOMEand bothapi.kimi.com/api.kimi.airegions):- Kimi Code CLI (
packages/oauth/src/managed-usage.ts) queriesGET <base_url>/usages(defaulthttps://api.kimi.com/coding/v1/usagesorhttps://api.kimi.ai/coding/v1/usagesperconfig.toml[providers."managed:kimi-code"].base_url) withAuthorization: Bearer <access_token>(refreshing viarefresh_tokenincredentials/kimi-code.jsonwhenexpires_athas passed). - That endpoint returns structured quota ratios and ISO/string reset timestamps:
usages.limit_5h:{ used_ratio, reset_time }(5-hour rolling quota)usages.limit_7d:{ used_ratio, reset_time }(7-day rolling quota)usages.limit_month_code&usages.limit_month_total:{ used_ratio, reset_time }boosterWallet:{ balance: { type: "BOOSTER", amount, amountLeft }, monthlyChargeLimit, monthlyUsed, monthlyChargeLimitEnabled }
- If the OAuth token cannot be read or refreshed, fall back to a Manage usage link pointing to
https://www.kimi.com/membership/subscription?tab=quota(orkimi.aiequivalent).
- Kimi Code CLI (
- In-thread usage-limit state & auto-resume: Recognize Kimi 429 quota-exhaustion responses and pair them with the
limit_5h.reset_time/limit_7d.reset_timewindow sosnoozeLimitedThreadsandautoResumeLimitedThreadswork cleanly as they do for Claude and Codex. - Token/cost usage scanning: Include
~/.kimi-code/sessions(and~/.kimi/sessions) in usage transcript scanning.
Version or commit
T3 Code server/desktop 0.1.6
Environment
- Server: Debian 13 Linux x64 (
0.1.6),acpRegistry_kimi_clipointing to Kimi Code CLI2.4.1(~/.kimi-code/bin/kimi) - Client: Windows 11 x64 T3 Code Desktop (
0.1.6) & mobile
Metadata
Metadata
Assignees
Labels
No labels
Activity