Codumentor logo Codumentor

Token Report Plugin

Adds a Token Usage section to the end-of-session report: model, estimated cost, input/output split, per-query averages, duration, and a per-query bar chart.

Enabled in the shipped default config. Printed by Console Report.

Configuration

plugins:
  - module: codumentor.plugins.token_report
    class: TokenReportPlugin

No plugin args. Requires session_report: true and Console Report.

Usage

No web or chat UI. After a print-mode (-p) run the session report includes:

  Token Usage
    Model: gpt-4o  Cost: $0.0124
    Total Tokens: 15.2K  Queries: 8

    Input:    12.4K ( 81.6%) ████████████████░░░░
    Output:    2.8K ( 18.4%) ████░░░░░░░░░░░░░░░░

    Per Query Avg: Total: 1900.0  Input: 1550.0  Output: 350.0
    Duration: 47.3s

    Per-query token usage (bars show relative token counts)
    ██ ████ ██ ██ ████ ██ ░░ ██

Cost is N/A when the model does not report an estimate. The per-query chart appears only when there were two or more queries.

Notes