AI usage meter for users: per-run token/credit/cost popover and per-account counters (after billing is complete)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start from ADR-008 and #173 (TokenUsage with cached tokens) to understand measured usage. The first piece is Krizaka UI's UsageMeter and UsageSummary components (stories, EN/FR, a11y) once krizaka-billing#72 ledger lands. Done means a popover shows per-run token/credit/cost breakdown and the account page shows period counters with CSV export, wired into all AI results.
Written by the indexing model from the issue text.
Description
Why (founder, 2026-10-30, screenshot of an AI studio's per-request usage popover)
« Issue pour ce type d'affiche pour les users qui utilisent des features d'IA : leurs compteurs. À ajouter dans le backlog, moins prioritaire, à faire quand le module bills sera complet. »
The reference shows, for one generation: input tokens (by modality), output tokens (by modality), thought tokens, the total against a limit (87 446 / 131 072), and an estimated cost per part and in total, labelled as an estimate.
What we want: a usage meter wherever a user runs an AI feature
In Orazaka's console and chat, Akinaza's AI photos and analytics (ADR-008), and Yomizaka's checks:
- Per run: a small popover on the result, showing:
- input, output, thought and cached tokens (by modality: text, image, video, audio);
- the context used against the model's limit;
- credits charged;
- the estimated cost, labelled « estimation », in the user's currency.
- Per account: the period's counters, credits left against the plan quota (or the admin-set quota), and a history with a CSV export.
- Honest numbers: they come from the engine's real usage (Orazaka run usage and observations:
TokenUsagewith cached tokens, #173), never computed in the UI. The cost uses the price table the admin maintains (rule « admin configures everything »). Credits come from krizaka-billing. - Privacy: counts only, never prompt or answer text (same rule as the telemetry).
Pieces
- Krizaka UI:
UsageMeter(popover with the per-part breakdown, a limit bar and an estimate badge) andUsageSummary(period counters and a quota bar), with stories, both themes, EN/FR and a11y. - Orazaka: a per-run usage endpoint and a per-account period aggregate (already measured; expose them).
- krizaka-billing: credits per run and the quota per plan, with the cached-read billing unit (krizaka-billing#72).
- Products: wire the meter into each AI result and into the account page.
Order
Backlog, lower priority: after krizaka-billing is complete (#72 and the credits ledger), then Krizaka UI pieces → Orazaka endpoints → products.
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- Avg merge
- 2h 49m
- Merged PRs (30d)
- 212
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from krizaka/.github
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
priority:P1 product:krizaka type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
standard(done): a feature is done on every surface of its product — web, admin, mobile, Mac and CLI — or says why notPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
krizaka/.github#427 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
krizaka/.github#423 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vllm-project/vllm#64845 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
pydantic/pydantic-ai#12091 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
[bug] openlit: LLM spans from openlit 1.37+ get no OpenInference attributes, and cache and reasoning token counts are droppedPossibly taken @sohom-cs claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Arize-ai/openinference#4199 · 1 reaction ·
Maintainers usually reply within 2 days