Skip to content

Repository files navigation

⚑ Token-Max: AI Model & Coding Plan Usage Tracker

GitHub Pages Models Tracked Plans Tracked License: MIT

Unobfuscate vague terms like "credits" and "requests" into definitive token counts.
An open-source dashboard tracking live pricing for 440+ foundation models and 33+ developer coding subscriptions to help you get the most intelligence out of every dollar.


🎯 Live Application

πŸ‘‰ Launch Token-Max


✨ Key Features & Analytical Tools

Token-Max provides an end-to-end workbench for engineering teams, independent developers, and AI researchers to audit, simulate, and optimize AI coding costs:

1. πŸ’° Budget Calculator ("What does $X get me?")

  • Set any monthly budget ($1 to $500).
  • Instantly see which models maximize your token output (e.g. at $20/month, get 130M+ tokens with DeepSeek Flash vs. 2M–10M tokens with flagship frontier models).
  • Directly compare pay-per-token API yields against all subscription plans in that price tier.
  • Lab Decision Engine modes:
    • Mix & Match: combines distinct lesser subscriptions whose summed price fits the budget via a greedy knapsack (2–4 subs).
    • Dangerous Dave Mode: stacks multiple copies of the same subscription to hit the budget. Checks provider stacking policies automatically.

2. πŸ–₯️ Local Hardware vs Cloud Breakeven Calculator (#/hardware)

  • Models upfront hardware CapEx (12, 24, 36, or 48 months depreciation with residual salvage resale value).
  • Models real electricity OpEx (system TDP watts under active inference vs idle at regional $/kWh utility rates).
  • Calculates the exact Breakeven Inflection Point and Crossover Token Volume against cloud APIs (Claude 3.7 Sonnet, DeepSeek-V3, GPT-4o) and subscriptions.
  • 6 curated workstation presets: Mac Mini M4 Pro (64GB), Mac Studio M4 Max (128GB), Mac Studio M4 Ultra (192GB), Custom Dual RTX 5090 (64GB), Single RTX 5090 (32GB), and Homelab RTX 4090 (24GB).
  • Local model feasibility matrix with VRAM headroom bars, generation throughput (t/s), max context lengths, and coding benchmark ratings.

3. 🧾 Autonomous Agent Session Receipt & Log Analyzer (#/receipt)

  • 100% client-side parser reading transcripts in browser memory with zero network data transmission.
  • Ingests Google Antigravity / Gemini CLI JSONL (transcript.jsonl), Cline / Roo Code (ui_messages.json), Aider markdown logs, and built-in sample session.
  • Generates an itemized thermal receipt breaking down Fresh Inputs, Cached Context Reads (with discounts), and Visible Code Diffs.
  • Cross-model repricing across 7+ models (DeepSeek Flash, DeepSeek-R1, Gemini Flash, o3-mini, Sonnet 5, Opus 5).
  • Subscription quota impact gauges for Cursor fast requests and Claude Code rolling pools.

4. 🏒 Multi-Seat Team & Org Gateway Economics (#/teams)

  • Models the 80/20 power-law distribution on engineering teams (70–80% casual developers consuming ~$3.80/mo vs 10–20% power developers consuming $78/mo).
  • Compares flat $19–$40/seat licenses vs. centralized BYOK API gateway vs. the Optimal Hybrid Strategy.
  • Demonstrates 35%–60% ($4,000 to $25,000/year) savings for a 25-engineer org.
  • Generates an instant, copyable Markdown executive procurement memo.

5. 🧠 Extended Thinking & Reasoning Token Exploder (#/reasoning)

  • Simulates hidden thinking token generation across configurable effort tiers (Off, Low 2K, Med 8K, High 24K, Max 48K).
  • Quantifies the 4x–12x silent bill multiplier when using reasoning models in coding agents.
  • Plan Absorption Matrix: Classifies 33 subscription plans by how they handle thinking tokens (Full Absorption, Quota Multiplier Penalty, or BYOK Pass-Through).

6. πŸŽ›οΈ BYOK Agent Router Config Exporter (#/exporter)

  • Generates copyable, downloadable, production-ready configuration files for:
    • Aider (.aider.conf.yml)
    • Continue.dev (config.json)
    • Cline (cline_custom_modes.json)
    • OpenCode (opencode.json)
    • Cursor Rules (.cursorrules)
  • Real-time monthly cost preview based on selected primary coding and fast reasoning/architect models.

7. ⏱️ 5-Hour Burst & Window Throttle Simulator (#/simulator)

  • Discrete 5-minute timestep simulation engine modeling sliding rate limits, rolling 5-hour pools, concurrency caps, and queue degradation cliffs.
  • Simulates real agent bursts (Antigravity sprints, overnight PR loops, multi-agent refactors).
  • Plan Headroom & Rate Limit Risk Matrix with color-coded safety margins.

8. πŸ”€ Multi-Model Mix & Overages Optimizer (#/optimizer)

  • Composes complex multi-model development workflows (e.g. 70% Sonnet 3.7 + 20% DeepSeek-R1 + 10% Gemini Flash).
  • Simulates pool drain against all 34 plans and identifies exact overage charges.

9. πŸ” Models Catalog & Pricing Explorer (#/models)

  • Live data ingested daily from OpenRouter covering 440+ models.
  • Breakdown of input, cached input, reasoning, and output costs per 1M tokens.
  • Blended Cost (3:1 chat) and Agentic Blended Cost (20:1 + prompt cache).

10. πŸ”„ Token Translator (Subscription Credits β†’ Tokens) (#/plans)

  • Translates opaque credit units and request caps into estimated token allowances across frontier and workhorse models.

11. πŸ“Š Quality vs. Cost & Benchmarks (#/benchmarks)

  • Artificial Analysis benchmark indices: Intelligence Index, Coding Index (SWE-bench, LiveCodeBench), and Agentic Index.
  • Pareto frontier quality vs cost scatter plot.

12. πŸ›‘οΈ Terms-of-Service & Privacy Audit (#/tos)

  • Data Training Matrix classifying training policies across Free, Individual, and Enterprise tiers.
  • Documents 5-hour rolling limits, tool-only API keys, lack of IP indemnity, and stacking policies.

🩸 Visual Identity

The UI is themed around the Heretek Blood & Steel design system β€” grimdark void surfaces, blood-red accents, and brass/rust rails β€” defined entirely in the @theme block of src/index.css. Brand assets (favicon, logotype included in Header/Footer via public/icon-sm.png / public/logo-web.png) ship in-tree.


πŸ—‚οΈ Tracked Services & Platforms (33+)

Category Platforms Included
Coding IDEs & Agents (14) Cursor β€’ GitHub Copilot β€’ Claude Code β€’ OpenAI Codex β€’ Google Antigravity β€’ Meta Muse Code β€’ Kiro (AWS) β€’ Lovable β€’ Windsurf β€’ Augment Code β€’ Replit β€’ Amazon Q Developer β€’ Tabnine β€’ Aider
Routers & Coding Plans (5) CommandCode β€’ Kilo Code β€’ OpenCode β€’ OpenRouter β€’ Kimi Code
Direct APIs & Cloud Token Plans (14) Z.ai GLM Coding Plan β€’ BytePlus ModelArk β€’ Alibaba Cloud Token Plan β€’ MiniMax β€’ OpenAI API β€’ Anthropic API β€’ Google AI Studio β€’ DeepSeek API β€’ Groq β€’ Mistral API β€’ Together.ai β€’ Fireworks.ai β€’ Meta Model API β€’ Ollama Cloud

πŸ“š Documentation & Agent Standards

Comprehensive architectural documentation and agent instructions are provided in the repository:

Document Description
SOURCE.md Authoritative primary evidence index, official documentation links, stated quota limits, and token derivation evidence for all 33 coding plans and model providers.
AGENTS.md Universal guidelines for all AI coding agents working on this codebase (Claude Code, Gemini CLI, OpenCode, Codex, Aider, Windsurf). Details architecture invariants, schema enforcement, and prohibited antipatterns.
CLAUDE.md Dedicated developer guide tailored for Claude Code and Anthropic AI CLI tools, including fast build/lint commands and model classification logic.
GEMINI.md Dedicated developer guide for Google Antigravity and Gemini CLI agents, including Codebase Knowledge Graph MCP tool conventions and verification rules.
docs/DATA_SOURCES.md Complete reference for all external data sources (OpenRouter API, Artificial Analysis API v2), data conversion formulas, and deep-dive documentation for all 33 coding plans.
docs/MAINTAINABILITY.md Operations runbook, automated daily cron workflows, manual data refresh procedures, troubleshooting guide, and step-by-step instructions for adding new subscription plans.

πŸ› οΈ Architecture & Data Pipeline

flowchart LR
    subgraph Ingestion["Automated Ingestion"]
        OR["OpenRouter API<br/>(/api/v1/models)"]
        AA["Artificial Analysis API<br/>(/api/v2/language/models/free)"]
        CP["Curated Coding Plans<br/>(data/coding-plans/*.json)"]
    end
    subgraph CI["GitHub Actions Cron"]
        Fetch["fetch-models & fetch-benchmarks"]
        BuildData["build-data.mjs (Derived metrics)"]
    end
    subgraph StaticApp["React 19 + Vite Static SPA"]
        UI["Interactive Dashboard & Calculator"]
        Tables["Models Explorer & Leaderboards"]
        TOS["TOS Audit & Translator"]
    end

    OR --> Fetch
    AA --> Fetch
    Fetch --> BuildData
    CP --> BuildData
    BuildData --> StaticApp
Loading
  • Daily Refresh: GitHub Actions cron (.github/workflows/update-data.yml) updates pricing and benchmarks daily at 06:00 UTC.
  • Static Hosting: Deployed directly on GitHub Pages with zero runtime backend dependency.

🌐 Published Machine-Readable Datasets

As part of the continuous deployment workflow to GitHub Pages, Token-Max automatically compiles and publishes static, structured JSON files for external tools, CLI scripts, and researchers:


πŸ’» Local Development

Prerequisites

  • Node.js 20+
  • npm

Installation

git clone https://github.com/Heretek-AI/Token-Max.git
cd Token-Max
npm install

Data Pipeline Commands

# Fetch latest OpenRouter models
npm run fetch-models

# Fetch benchmarks from Artificial Analysis (requires AA_API_KEY)
AA_API_KEY="your_api_key" npm run fetch-benchmarks

# Build and consolidate final JSON datasets
npm run build-data

# Run all 3 in sequence
npm run update-data

Run Web App

npm run dev

Quality & Verification Checks

# Validate 34 plan files against schema invariants
npm run validate-data

# Run full unit test suite (109 tests across 8 suites)
npm test

# Run linter (oxlint: 0 errors, 0 warnings enforced)
npm run lint

# Production build (tsc -b && vite build)
npm run build

πŸ“„ License

MIT Β© Heretek-AI

About

Track 440+ AI model costs and 32+ coding agent plans. Translates obscure tokens/credits into definitive usage metrics, benchmarks, and TOS gotchas.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages