llm_cost_tracker is a Ruby gem (v0.1.3) that tracks token usage and estimated costs for multiple LLM providers including OpenAI, Anthropic, Google Gemini, OpenRouter, and DeepSeek. It integrates as Faraday middleware, supports ActiveRecord for storage, enables per-user and per-feature cost attribution, and provides budget alerts and enforcement.

1m read timeFrom rubygems.org
Post cover image

Sort: