rossoctl / rossoctl/cortex

feature: per-session and per-model token and cost aggregation

Open
#950 1 comment 0 reactions 1 assignee View on GitHub

@huang195 is already working on this.

Since Sep 10, 2026.

enhancement high priority
Dominant language
Go
Stars
13
Forks
40
Avg merge
12h 17m
Merged PRs (30d)
156

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.