llm_cost_tracker 0.8.0 - track OpenAI/Anthropic/Gemini spend from your Rails app
Briefly

"llm_cost_tracker is a Rails-engine cost ledger that hooks into Faraday and the official OpenAI, Anthropic, and Gemini SDKs to capture token usage and tool charges per request, prices them against a pluggable rate snapshot, and persists everything via a durable inbox to Postgres or MySQL - with a built-in dashboard that slices spend by model, provider, tags, and pricing mode."
"Version 0.8.0 is a storage rebuild. Tokens and tool/runtime charges (web search, code execution, file search, Gemini grounding, OpenAI Code Interpreter sessions) now share one shape and live in a dedicated line items table. Tags moved to a normalized table for consistent JOIN-based filtering on Postgres and MySQL."
"Compound pricing modes like priority_batch_data_residency resolve via permuted lookup. Call rollups gained a currency column with a (period, period_start, currency) unique index, ahead of v0.9 multi-currency. The dashboard got shared filter/sort partials, sticky table headers, and a full prefers-color-scheme dark palette."
"Breaking renames and column removals - there is no rolling-deploy upgrade. See the upgrading guide and the CHANGELOG before bumping."
llm_cost_tracker is a Rails engine that captures token usage and tool/runtime charges for each request by integrating with Faraday and official OpenAI, Anthropic, and Gemini SDKs. It prices captured usage against a pluggable rate snapshot and persists results through a durable inbox into Postgres or MySQL. A built-in dashboard slices spend by model, provider, tags, and pricing mode. Version 0.8.0 rebuilds storage so tokens and tool/runtime charges share one shape in a dedicated line items table. Tags move to a normalized table for consistent JOIN-based filtering. Compound pricing modes use permuted lookup, and call rollups add a currency column with a unique index. Breaking renames and column removals require a non-rolling upgrade using the upgrading guide and changelog.
Read at Rubyflow
Unable to calculate read time
[
|
]