llm_cost_tracker 0.14.1: RubyLLM 2.x, long streams, transaction-safe writes
llm_cost_tracker is self-hosted LLM cost tracking for Rails: every call through RubyLLM, the OpenAI and Anthropic SDKs, Gemini, or any OpenAI-compatible API is logged with tokens, cost, and tags, with no proxy. 0.14.1 is a bug-fix release:
- RubyLLM 2.x calls are recorded again
- Long streams record their real usage instead of $0, with flat memory
- A failed ledger write no longer breaks your app’s own database transaction
- An LLM call never fails just because the gem couldn’t record it
- Ruby 3.3 is supported
Security: from v0.9.0 to v0.14.0, a provider API key passed in the URL (Gemini ?key=, Azure ?api-key=) could be stored in call tags. Upgrade and rotate the key; the changelog has the cleanup SQL.
Post a comment