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.14.0: per-tag LLM budgets and a batch of cost-accuracy fixes

llm_cost_tracker is a Rails engine that records what your app spends on LLM APIs - per call, per model, per tag - into your own database, with a mounted dashboard.

0.14.0 adds per-tag budgets: one limit applied to every distinct value of a tag, for as many tags as you declare.

config.budgets.per_tag = {
  tenant_id: { monthly: 1000 },
  user_id:   { daily: 25, behavior: :block_requests }
}

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

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