Skip to content

feat(provider-kiro): report live account credit limits - #1

Draft
MrFruitDude wants to merge 2 commits into
v2/kiro-acpfrom
feat/kiro-account-credit-limits
Draft

MrFruitDude wants to merge 2 commits into
v2/kiro-acpfrom
feat/kiro-account-credit-limits

Conversation

@MrFruitDude

Copy link
Copy Markdown
Owner

Kiro's native provider exposes models and agents, but Usage Limits and /usage-limits have no account credit allowance. This adds the allowance, overage status and billing reset day using the existing session-free ACP status probe. Failed reads retain the last good limits without losing the agent picker; credits stay separate from tokens and USD.

This contribution draft builds on upstream pingdotgg#14693. It stays in this fork while maintainer approval of the scope is outstanding. It complements the existing context-telemetry and historical-credit PRs.

The Kiro account usage method is not advertised in ACP's extension list. It was verified against Kiro 2.33.1, 2.34.2, 2.35.0 and 2.35.2; unsupported or failed responses remain explicit.

Validation: 55 focused tests passed during implementation. The parent reran the 15 provider tests and check:changed against the stacked base: format, lint, knip, GraphQL checks and typechecks across 10 packages passed. A real Kiro 2.35.2 probe returned credit limits without creating a session. One wording nit was fixed; a rare combined initialization/usage timeout nit was left outside this change.

Reviewed with sol-loop: 1 round with gpt-6.1-sol on high. Sol verdict: approved.

Implemented with Claude Opus 5.5 in Claude Code through T3 Code.

Kiro reported no subscription limits, so Usage → Limits and /usage-limits
had nothing for it, though Kiro's V3 engine can answer `_kiro/account/getUsage`
without a session.

The provider status probe already opens a sessionless `kiro-cli acp` for the
agent picker. It now also asks that process for the account's usage and maps
each limited allowance to a monthly window: percent of the plan's credits used,
reset at the start of the billing-cycle day Kiro reports. Past the allowance
with overages on, the bar is full and labelled overage. Overage charges in
currency are not shown. Unlimited and organization-managed plans report
`unsupported`; unreadable answers report `probeFailed`, which keeps the last
bars for the same account. The usage request has its own 5 second bound, so a
slow answer from Kiro's service cannot cost the agent list.

Stacked on pingdotgg#14693. Complements pingdotgg#24580 (context telemetry) and pingdotgg#27023
(historical credits in Usage).

Opus 5.5 via Claude Code in T3 Code

EtanHey commented Nov 3, 2026

Copy link
Copy Markdown

Note

🤖 GPT-6.1 Sol responding on behalf of Etan

I tested the existing draft at 47564f3758 on current main, including Kiro CLI 2.37.1 and a signed-in FREE account. The session-free _kiro/account/getUsage probe returned a 50-credit allowance, and the actual Usage view renders Credits and the billing reset.

The local validation found these integration cases:

  1. FREE exhaustion and overages differ. 0/25/50/75 used out of 50 correctly maps to 0/50/100/100% used. When overages are enabled, an exhausted allowance must not trigger automatic new-thread fallback. An optional per-window overagesEnabled flag, shared exhaustion check and cache comparison cover this; another exhausted hard limit still triggers fallback. Overages were tested with fixtures, not a real paid account.
  2. Kiro needs filter/presentation registration. Adding limits without a UsageProviderKind entry leaves Kiro outside the provider menu; “No providers” still shows its card. Registering Kiro plus web/mobile labels/colours fixes the reverse state without adding historical credit accounting. Kiro appears as an empty Cost/Tokens filter option and one extra loading row; older local preferences reset to defaults on downgrade.
  3. Bonus/add-on balances are not verified. The installed CLI exposes these fields, but our account returns empty lists. The candidate conservatively treats nonempty lists as unsupported: no Credits bar or false hard exhaustion. Usage hides the section; the explanation appears in thread/composer surfaces. Explicit null list values currently fail the usage read (unobserved low-priority limitation).
  4. Bound reads independently. Initialize, agent discovery and usage requests have separate time limits so a slow usage reply does not discard the discovered agents.

Full validation/correction patch against base 61c3794c32 · actual filter/display recording

Kiro Credits

Local candidate 31d20c1dcd: independent Claude source review approves; 5 focused files/96 tests pass, and check:changed passes. Web menu/hide/No providers/restore and 390px light/dark display were checked. Mobile label/colour changes are source/typecheck only. No real paid, overage, bonus/add-on account, Electron shell, native mobile, remote or installed-build acceptance is claimed.

Independent Luna recording QA inspected 13 sheets and 41 full-size frames. It confirmed no visual regression in the inspected revised media; verdict INCONCLUSIVE, because the roughly 1–3 fps cadence cannot establish 200 ms smoothness or distinguish every cancel/re-grab event. The Cursor prompt is a layout fixture. No complete acceptance or installed-app claim is made. QA summary and selected decoded frames.

Keeping scope/approval discussion in pingdotgg#27111; no competing upstream PR. Evidence and limits.

🤖 Generated with GPT-6.1 Sol and Claude Opus 5.5 in T3 Code Nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants