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 v0.10.0

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

Rails engine that ledgers every LLM call — OpenAI, Anthropic, Gemini, Azure OpenAI, RubyLLM — with tokens, cost, latency, attribution tags, and a built-in dashboard. v0.10.0 highlights:

  • Pre-send budget guard. budget_exceeded_behavior = :block_requests now also estimates the call’s input cost and blocks before send when prior spend plus the estimate would cross a daily / monthly / per-call limit.
  • Azure OpenAI Foundry zero-config. Capture works out of the box on *.services.ai.azure.com and the /openai/v1/... path, in addition to the classic *.openai.azure.com + deployments URL.
  • Chat Completions web-search fee capture. Calls to gpt-4o-search-preview, gpt-4o-mini-search-preview, and gpt-5-search-api now record the per-call web-search line item at OpenAI’s “Web search preview” rate ($25/1k non-reasoning, $10/1k reasoning) — previously dropped.
  • Multi-currency pricing. A prices_file with metadata.currency: "EUR" flows through the pricing snapshot, rollups, line items, and the dashboard total instead of being hardcoded to USD.

CHANGELOG: https://github.com/sergey-homenko/llm_cost_tracker/blob/main/CHANGELOG.md

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