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!

LLMCostTracker 0.15.0: per-run budgets for agents, RubyLLM 2.1, more providers

LLMCostTracker records the LLM calls your Rails app makes through RubyLLM, the official OpenAI and Anthropic SDKs or Faraday into your own database: priced per call, tagged by user, feature or any tag, with budgets and a dashboard. No proxy, no prompts stored.

0.15.0 adds per-run budgets: cap an agent run’s lifetime spend or number of calls by run_id, and calls inside RubyLLM.workflow get the workflow’s id as their run_id on their own. RubyLLM 2.x is now captured from its instrumentation events, one row per provider attempt with retries and fallbacks included, and RubyLLM 2.1 is supported. Perplexity, xAI and Mistral are captured without setup, DeepSeek is priced at its peak and off-peak rates, and calls made under Rails’ read-only database roles are recorded instead of lost. There are no migrations, but prices:refresh on 0.14.x stops working, so upgrade to keep prices current. Release notes

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