{"slug": "i-built-tokenledger-a-100-browser-private-llm-finops-studio-14-tools-24-models", "title": "I built TokenLedger: a 100% browser-private LLM FinOps studio (14 tools, 24 models, MIT)", "summary": "A developer built TokenLedger, an MIT-licensed, browser-only LLM FinOps studio that bundles 14 interactive calculators covering 24 flagship models from OpenAI, Anthropic, Google, DeepSeek, xAI, Meta, Mistral, Qwen and Perplexity. The tool estimates API costs with prompt caching, batch discounts and model-cascade routing, and models multi-turn agent O(N²) context growth, MCP tool-schema overhead, KV-cache VRAM quantization and self-hosted GPU versus cloud API break-even points. It runs entirely client-side with no uploads or login, and ships a zero-dependency CLI, a CORS-enabled pricing snapshot API and a GitHub Action YAML for blocking token regressions in pull requests.", "body_md": "Every time I tried to estimate production LLM costs, existing calculators had two problems:\n\n1. They only multiplied single-prompt token rates—ignoring the real architectural traps that blow up AI bills (multi-turn agent O(N²) context snowballing, MCP tool-schema tax, prompt caching hit rates, KV-cache VRAM overhead).\n2. They asked me to paste prompts or tool schemas into a web app backed by a server.\n\nSo I built **TokenLedger** — a **100% browser-private, zero-upload, MIT open-source AI & LLM FinOps Studio** covering **24 flagship models** across **14 interactive calculators**.\n\n## \n  \n  \n  What's Inside (14 Browser-Local Workspaces)\n\n1. \n**24-Model Live API Cost Estimator** — OpenAI (GPT-5, GPT-4.1, o3, o4-mini), Anthropic (Claude Opus 4, Sonnet 4, Haiku 3.5), Google (Gemini 2.5 Pro/Flash/Flash-Lite), DeepSeek (V3, R1), xAI (Grok 3), Meta (Llama 4), Mistral, Qwen, and Perplexity with prompt caching (0–95%), 50% async batch discounts, 70/30 model cascade routing, 5-currency live switcher (USD/EUR/GBP/JPY/KRW),`Ctrl+K` palette, and Markdown/CSV/PNG exports.\n2. \n**Multi-Turn Agent Burn Simulator** — Models quadratic O(N²) context accumulation in ReAct/tool-calling loops vs. prefix prompt caching and sliding-window summarization turn by turn.\n3. \n**MCP & Function-Calling Schema Tax Auditor** — Paste your JSON tool definitions locally to rank the heaviest schemas and quantify Prompt Caching vs. Lazy Tool Deferral savings.\n4. \n**GPU VRAM & KV-Cache Quantization Calculator** — Models Q4/FP8/FP16 weights + FP8 KV-cache halving across Llama 3.3 70B, DeepSeek-R1, Qwen 32B, and Mistral on 4090 / L40S / A100 / H100.\n5. \n**Self-Hosted GPU vs. Cloud API Break-Even** — Finds the exact daily request volume where renting vLLM GPUs + DevOps overhead beats cloud APIs.\n6. \n**Fine-Tuning vs. RAG vs. Caching 12-Month TCO** — Compares LoRA training refreshes, vector DB RAG synthesis, and long-context prompt caching with ADR export.\n7. \n**CFO Hybrid Waterfall** — Stacks caching + frontier-to-mini cascade + 50% batch tiers into an executive annual savings breakdown.\n8. \n**LLM Rate-Limit (RPM/TPM) Capacity Planner** — Calculates burst peak TPM, Little's Law concurrency, required vendor tier, and exports token-bucket rate-limiter JSON.\n9. \n**AI SaaS Gross Margin Simulator** &**AI Startup Runway Calculator** — Models per-seat COGS, Stripe fees, power-user break-even caps, and 24-month cash runway.\n10. \n**RAG & Vector DB TCO Planner** &**Voice/Vision Multimodal Studio** — Sizes embeddings, HNSW RAM, OpenAI Realtime vs. Gemini Live audio, and image generation.\n11. \n**Prompt A/B Cost Diff + GitHub Action CI Budget Guard** — Compares prompt rewrites and exports a drop-in GitHub Action YAML to block token regressions in PRs.\n12. \n**Context Window & JSON Schema Minifier Inspector** — Estimates OpenAI/Claude/Gemini tokens locally and minifies bloated JSON schemas.\n\n## \n  \n  \n  Zero-Dependency CLI & Open JSON API\n\nRun estimates directly inside CI or Notion/GitHub RFC workflows:\n\nOr fetch the CORS-enabled pricing snapshot directly:\n\nEverything is open-source (MIT) and runs entirely client-side with zero login walls. If there are specific pricing edge cases you hit in production (AWS Bedrock PTU, extended thinking tokens, multi-GPU tensor parallelism, etc.), drop a comment or open an issue on GitHub!", "url": "https://wpnews.pro/news/i-built-tokenledger-a-100-browser-private-llm-finops-studio-14-tools-24-models", "canonical_source": "https://dev.to/woodori1234max/i-built-tokenledger-a-100-browser-private-llm-finops-studio-14-tools-24-models-mit-1120", "published_at": "2026-11-26 13:12:49+00:00", "updated_at": "2026-11-26 13:19:06.482153+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "ai-infrastructure", "developer-tools"], "entities": ["TokenLedger", "OpenAI", "Anthropic", "Google", "DeepSeek", "xAI", "Meta", "Mistral"], "also_reported_by": [], "takeaway": "TokenLedger's multi-turn agent simulator models quadratic O(N²) context accumulation in ReAct loops against prefix caching and sliding-window summarization, and its schema tax auditor quantifies prompt caching versus lazy tool deferral savings for MCP tool definitions.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/i-built-tokenledger-a-100-browser-private-llm-finops-studio-14-tools-24-models", "markdown": "https://wpnews.pro/news/i-built-tokenledger-a-100-browser-private-llm-finops-studio-14-tools-24-models.md", "text": "https://wpnews.pro/news/i-built-tokenledger-a-100-browser-private-llm-finops-studio-14-tools-24-models.txt", "jsonld": "https://wpnews.pro/news/i-built-tokenledger-a-100-browser-private-llm-finops-studio-14-tools-24-models.jsonld"}}