WeSearch

Show HN: Tokentoll, a CI gate for LLM API cost regressions

·5 min read · 0 reactions · 0 comments · 11 views
#technology#software#development
Show HN: Tokentoll, a CI gate for LLM API cost regressions
⚡ TL;DR · AI summary

Tokentoll is a continuous integration (CI) tool designed to prevent cost regressions in large language model (LLM) API usage. It analyzes code in Python, JavaScript, and TypeScript, providing a verdict on pull requests based on user-defined policies. The tool can automatically fail workflows that violate these policies, ensuring that cost increases are managed before merging changes.

Key facts
Original article
GitHub
Read full at GitHub →
Opening excerpt (first ~120 words) tap to expand

tokentoll Prevent LLM cost regressions before production. tokentoll is a CI gate for LLM cost. It statically analyzes Python, JavaScript, and TypeScript for LLM API calls, scores every pull request against a policy you control, and posts a PASS/WARN/FAIL verdict directly on the PR. Optionally, it fails the workflow when the policy is violated, so cost regressions cannot be merged. Live demo Jwrede/tokentoll-demo is a small polyglot LLM app (Python + TypeScript) wired up to the tokentoll cost gate. Two PRs are already open against it: PR #1: Add Anthropic Haiku translation helper. New call site, well within budget. Verdict: PASS, workflow green. PR #2: switch supportbot to gpt-4o. A model swap that trips two policy rules. Verdict: FAIL, workflow red.

Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from GitHub