RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

llm_cost_tracker 0.13.0 — self-hosted LLM cost tracking for Rails

https://github.com/sergey-homenko/llm_cost_tracker

0.13.0 leans on accounting-grade accuracy: track now rejects unrecognized token keys instead of silently undercounting (breaking — see changelog), async ingestion no longer loses cost data on transient DB errors, OpenAI tool calls are priced correctly, and non-USD costs render in their own currency.

Logs every call your Rails app makes to OpenAI, Anthropic, Gemini, RubyLLM, or any OpenAI-compatible API — tokens, cost, latency, tags. App → provider direct, no proxy. Not tracing or replay; spend attribution only.

Ruby 3.4+, Rails 7.1+, PG/MySQL.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in