LLM Cost Tracker 0.12 — self-hosted LLM spend tracking for Rails
💎 https://rubygems.org/gems/llm_cost_tracker
📝 https://github.com/sergey-homenko/llm_cost_tracker
A Rails engine that logs every call your app makes to OpenAI, Anthropic, Gemini, RubyLLM, or any OpenAI-compatible API - tokens, cost, latency, tags - into an ActiveRecord ledger with a built-in dashboard. Calls go app -> provider direct: no proxy, no prompts or traces, just spend attribution.
0.12 adds OpenRouter pricing, OpenAI + Anthropic batch-API capture, audio-minute / image-generation / hosted-tool line items, and fixes RubyLLM streaming capture for Anthropic and Gemini. A few breaking changes (the event cost payload shape, manual track token keys) - see the changelog.
Ruby 3.4+, Rails 7.1+, PostgreSQL or MySQL.
Post a comment