{"repo":"sergey-homenko/llm_cost_tracker","free":true,"listed":false,"github":"https://github.com/sergey-homenko/llm_cost_tracker","clone":"git clone https://github.com/sergey-homenko/llm_cost_tracker.git","description":"Rails-native LLM cost ledger: track spend by provider, model, and feature with self-hosted storage and budget guardrails.","language":"Ruby","stars":44,"topics":["anthropic","cost-tracking","faraday","gemini","llm","llmops","openai","ruby","rails","ai"],"license":"MIT","category":"ai-agents","readme_excerpt":"LLM Cost Tracker Self-hosted LLM cost tracking for Rails. Every call your app makes through RubyLLM, the official OpenAI and Anthropic SDKs, Gemini, or any OpenAI-compatible API gets logged: tokens, cost, latency, tags. Calls go app → provider direct. No proxy. Not Langfuse, Helicone, or LiteLLM. No prompts, no traces, no replay. Spend attribution only. Requires Ruby 3.4+, Rails 7.1+, PostgreSQL or MySQL. Quickstart Shown with RubyLLM; the flow is identical for the official OpenAI and Anthropic SDKs — swap the gem and the instrument name (see the cookbook). Runs the install generator, drops a price snapshot, migrates the database, and verifies via llm cost tracker:doctor . Then enable the integration in the generated config/initializers/llm cost tracker.rb : Edit it in place to add tags, switch on async ingestion, etc. Your RubyLLM calls stay unchanged — every chat, embedding, transcription, image, and moderation call now lands in the ledger. Tag them to attribute spend: Mount the dashboard in config/routes.rb , behind your auth: The engine ships without authentication on purpose. What lands in the ledger - Calls. Provider, model, total tokens, total cost, latency, status. - Line items. Per-component breakdown — text/audio/cached tokens, tool charges (web search, code execution, grounding, container sessions). - Tags. Whatever attribution you pass — user, feature, tenant, env. - Provider IDs. Response, project, API key, workspace — for downstream audits. - Pricing snapshot. S","default_branch":null,"files":null,"tree":[],"storefront":"/r/sergey-homenko","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sergey-homenko/llm_cost_tracker/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}