feature: per-session and per-model token and cost aggregation
@huang195 is already working on this.
Since Sep 10, 2026.
Assessment
This issue has not been assessed yet.
Description
Feature Description
The primary deliverable of the release. Today the numbers are per-event: you can see a request,
but not what a session, a model, or a day cost.
The parser already records the full breakdown — parsercommon.TokenUsage carries input,
cache-read, cache-write and output — so what is missing is aggregation, not measurement.
Proposed Solution
- Aggregate per session: input / cache-read / cache-write / output tokens, cost, wall time
- Aggregate per model and per endpoint
- Cache-read and cache-write reported separately — they price very differently and
conflating them makes every cost number wrong - Aggregates survive a restart (depends on #901)
- One documented field-name schema, shared by the TUI metrics view, unattended workloads
and the central collector (#898)
Additional Context
Part of the Cortex v0.9.0 release. Depends on session differentiation — per-session aggregation
is meaningless while two concurrent sessions cannot be told apart. Fix #900 first: that is the
narrower "no token shown at all" bug.
- Dominant language
- Go
- Stars
- 13
- Forks
- 40
- Avg merge
- 12h 9m
- Merged PRs (30d)
- 164
Contributor 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 rossoctl/cortex
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
nice to have
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100