LLM Cost Profiler: Open-source tool tracks API spending to make case for local models

✍️ OpenClawRadar📅 Published: April 15, 2026🔗 Source
LLM Cost Profiler: Open-source tool tracks API spending to make case for local models
Ad

LLM Cost Profiler is an open-source Python tool that tracks every API call your code makes to OpenAI and Anthropic, showing exactly what you're spending, where, and why. The tool exposes which tasks are overpriced relative to their complexity, providing concrete data to make the case for local inference.

Ad

Key Features and Findings

The tool stores everything in local SQLite and is MIT licensed. According to the source, it found several specific examples of API call waste:

  • A classifier using GPT-4o that outputs one of 5 labels — a task any decent 7B local model handles easily. Cost: ~$89/week on API calls.
  • Thousands of duplicate calls to the same prompt — zero caching. Local inference with caching would make this effectively free.
  • A summarizer where 34% of calls were retries from format errors. A well-tuned local model with constrained generation eliminates this entire class of waste.

The author notes this tool gives teams concrete ammunition for investing in local inference infrastructure: "Here's the exact dollar amount we'd save by moving X task to a local model."

The tool is available on GitHub at https://github.com/BuildWithAbid/llm-cost-profiler. The author is planning to add support for tracking local model inference costs too (compute time based costing) and asked the community if this would be useful.

This type of cost profiling tool is particularly relevant for developers using AI coding agents, as it provides data-driven insights into where API spending might be inefficient compared to local alternatives.

📖 Read the full source: r/LocalLLaMA

Ad

👀 See Also

Claude Code Plugin for D&D Campaigns Using Markdown State Tracking
Tools

Claude Code Plugin for D&D Campaigns Using Markdown State Tracking

A Claude Code plugin uses markdown files to track campaign state and lets Claude act as Dungeon Master for solo D&D sessions. The system is free and open-source, requiring installation as a plugin followed by the /claude-dnd:new-campaign command to start.

OpenClawRadar
Claude Code plugin analyzes any plugin and generates interactive wiki reports
Tools

Claude Code plugin analyzes any plugin and generates interactive wiki reports

A new Claude Code plugin called vision-powers analyzes any plugin path or GitHub URL and generates an interactive HTML wiki report with architecture diagrams, security audits, and skill breakdowns. Installation is via claude plugin add vision-powers@claude-code-zero.

OpenClawRadar
Nexus: Open-Source AI-to-AI Protocol with Discovery, Trust, and Payments
Tools

Nexus: Open-Source AI-to-AI Protocol with Discovery, Trust, and Payments

Nexus is a self-hosted protocol that enables AI agents to discover each other, negotiate terms, verify responses, and handle micropayments without human intervention. It includes five layers: discovery, trust, protocol, routing, and federation, with 66 tests and MIT licensing.

OpenClawRadar
Open Source Vigil Tool Addresses Agent Identity Problem in OpenClaw Ecosystem
Tools

Open Source Vigil Tool Addresses Agent Identity Problem in OpenClaw Ecosystem

An OpenClaw user building a web service discovered agent traffic indistinguishable from human users, prompting development of Vigil - an open source identity layer based on W3C DID that provides cryptographic credentials and behavioral history for agents.

OpenClawRadar