Repository navigation
Kiro credit history in Usage #27621
Replies: 3 comments 1 reply
|
@juliusmarminge or @maria-rcks, can you provide some direction? It would be nice to move forward now that we’ve merged Kiro support. |
|
I checked the V3 session files on macOS with Kiro CLI 3.3.0 installed. One detail for the history reader: a single If Usage shows a request count, I’d count distinct recorded request IDs and keep credits at the execution level. For example, replaying the same summary with two IDs and 0.3 credits should still show two observed requests and 0.3 credits, including when the turn was aborted. Missing IDs should leave that execution’s count unknown, so the aggregate is a lower bound. The summaries I checked had no input/output token breakdown or dollar charge to assign to those IDs. If you’re open to a PR for the request-counting piece, I’d love to help with the implementation and tests :) |
|
I tested the 1. Kiro bills credits that no Kiro bills compaction, and a small amount at the start of most sessions, as "auxiliary" credits. Kiro CLI 3.5.0 records them in a new line of {"id":"…","timestamp":"…","payload":{"type":"session_metadata","key":"creditSplit","value":{"main":0.0602,"delegated":0,"auxiliary":0.1398},"executionId":""}}The values are cumulative. In the 10 new sessions that I started on 3.5.0, The The older versions wrote no 2. A reader rule that agreed with the account For each There is one trap, which I saw in one fork of a compacted session. The fork file starts with the copied compaction summary and has none of the lines from before it. Its first The start rule is a heuristic. It assumes that 3. Two things for a new version of #27619
Two of the open questions
Legacy What else I checked, and the limits
Result on Limits:
|
Uh oh!
There was an error while loading. Please reload this page.
Kiro turns never appear on the Usage page. Kiro is the native ACP provider in #14693, and its local history records credits billed per turn, not tokens, while Usage today only models tokens and USD.
Would you accept Kiro credit history in Usage, and with which shape?
What Kiro records
V3 engine (what T3 runs:
kiro-cli acp --agent-engine=v3),~/.kiro/sessions/<hash>/sess_*/messages.jsonl:usage_summarylines carrypromptTurnSummaries: [{ unit: "credit", usage: 0.024 }]plus anexecutionId.agent_notelines ("The current model is Claude Haiku 4.5.").session.jsonkeeps just the latest model, so it would misattribute turns after a switch.~/.kiro/sessions/cli/*.jsonsessions have token fields, but they are all 0.Proposed scope
A transcript reader in
provider-kiro, plus an optionalcreditsnumber on usage records and buckets. Credit-only usage is shown as "N credits · Billed in credits · no token data" in the web and mobile provider rows and model table, and staysunpriced, so it never shows as $0 and never enters token totals, cost estimates or the daily chart. No contract or cache version bump, because older clients and servers skip the unknown provider.A working draft with tests, a check against my real history, and web/mobile before/after screenshots: #27619 (stacked on
v2/kiro-acp).This is separate from #27111, which covers live account credit limits (Usage → Limits). This proposal covers historical credit consumption (Usage → Cost).
Open questions
creditsfield, or a generic{ unit, amount }for any non-token billing unit?cli/sessions be read? They have credits, but zero tokens.All reactions