Open-Sourcing runcost: A Comprehensive Tool for Tracking LLM API Costs
pawofdoom · reddit · 2026-07-31
Tracking token usage and calculating costs across various LLM APIs can be tedious for developers. The author shares runcost, an open-source library they built (available via npm install runcost).
The tool is designed to handle the pricing logic, formats, and edge cases of almost every provider automatically, without requiring constant manual price updates. The author is reaching out to the community to see if there are other common, off-the-shelf solutions being used for this problem.
More from coding & agent
- Ling 3.0 Flash Beats Flagships in Coding Agent Benchmark with Only 5.1B Active Params — FellMentKE · 2026-08-01
- AI Coding Yields 100x Speedup on Standalone Tasks, Minimal Gains on Large Codebases — iskander · 2026-08-01
- Cloudflare Agents SDK Adds Support for Latest MCP Specification — ritakozlov · 2026-08-01
- YC-Backed machine_0 Launches CLI to Give AI Agents Persistent Cloud Computers — ycombinator · 2026-08-01
- Developer Documents the Rapid Evolution of Coding Agent Workflows — jonasgeiping · 2026-08-01
- AI Coding Agents Can Only Add Code? Dev Shares Refactoring Workarounds — julianharris · 2026-08-01