DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to audit token use and stream failures over the last week with Underclass

Summarize requests, tokens, and failed streams per model or account from the local database.

Who it is forA developer or team lead who wants to know which models and accounts used the pool and where streams failed.

The problemWithout a record, it is hard to tell whether failures came from capacity, policy errors, quota, or upstream stream breaks.

The outcomeA table of requests, tokens in and out, concurrency, failed streams, and events for the chosen window, plus a dry run of any Codex rollout backfill.

What you need first

  • Rust toolchain with cargo, to run `cargo run -- serve` from the repo
  • openssl available on the machine, to generate the proxy key and UI token
  • At least one ChatGPT/Codex, GitHub Copilot, or Claude Code subscription you are entitled to use
  • opencode installed if you want to use the OpenAI-compatible path from that client
  • Read each provider's terms before pooling accounts; the README does not address this

Steps

  1. With the server running, run underclass stats --since 7d --by model to see totals per model. (inferred, check the README)
  2. Run underclass stats --since 7d --by account to compare accounts. (inferred, check the README)
  3. Read the failed streams and the overloaded, policy, quota, cooling, and saturated event columns.
  4. Run underclass stats import-codex --dry-run to preview any capacity or policy errors that can be backfilled from Codex rollout logs. (inferred, check the README)
  5. Run underclass stats --since 7d --by model --json if you need the output in a script. (inferred, check the README)

Prompt for your agent

In the underclass repo at <repo path>, with the server running, run `underclass stats --since 7d --by model` and save the output. Expected output: a UTC table with requests, tokens in and out, and event columns. Verify that the totals match the sum of the per-model rows.

Caveat. The README says historical rows remain queryable after account removal, but statistics are kept only for the retention set in stats_retention_days, which defaults to 730 days.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page