Built an open-source LLM API cost profiler — makes the case for local models with hard numbers

Posted by abidtechproali@reddit | LocalLLaMA | View on Reddit | 3 comments

I know this community is focused on local models, but hear me out — this tool might actually help make the case for local inference better than any benchmark.

LLM Cost Profiler tracks every API call your code makes to OpenAI/Anthropic and shows you exactly what you're spending, where, and why. The interesting part for this community: it exposes which tasks are ludicrously overpriced relative to their complexity.

For example, in my own codebase it found:

If you're trying to convince your team to invest in local inference infrastructure, this tool gives you the ammunition. "Here's the exact dollar amount we'd save by moving X task to a local model."

It's Python, MIT licensed, stores everything in local SQLite.

GitHub: https://github.com/BuildWithAbid/llm-cost-profiler

Planning to add support for tracking local model inference costs too (compute time based costing) — would that be useful to anyone here?