Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Llm Cost Tracking Bundle Laravel Package

lunetics/llm-cost-tracking-bundle

Lunetics LLM Cost Tracking Bundle helps Symfony/PHP apps monitor LLM API usage and estimate spend across providers and models. Track token counts, attribute costs to users or features, set budgets, and review usage via dashboards and reports.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • LLM spend visibility as a first-class feature, not a dashboard afterthought. This package instruments LLM calls and attributes cost per call/session, which directly supports decisions like: do we ship a usage-based pricing tier, do we cap free-tier token budgets, and where do we put guardrails before costs surprise us.
  • Build vs. buy on cost accounting. Token counting, per-provider price tables, and price-change maintenance are undifferentiated plumbing. Adopting a package here frees engineering to spend roadmap capacity on product surface (budgets, alerts, per-tenant quotas) instead of re-deriving OpenAI/Anthropic pricing.
  • v0.6.0 specifically supports a trust decision. Surfacing skipped calls in the profiler panel turns an invisible correctness risk — "our cost numbers look low, but is that real?" — into an auditable one. If calls are being skipped (cached, unsupported provider, missing instrumentation), the cost data is silently understated. That is the difference between a metric you can put in a customer-facing invoice and one you cannot. This release makes the gap observable, which is a prerequisite for using the numbers in billing or contractual reporting.
  • Debug/profiler-first design is a fit for internal tooling and staging validation, less so for production runtime enforcement. That distinction drives whether cost controls live in this package or in our own middleware.
  • Roadmap input: expect a 1.0 stabilization cycle. Pre-1.0 with interface churn means we should plan a thin internal adapter layer rather than letting the package's types leak across our codebase.

When to Consider This Package

Consider adopting when:

  • We are shipping LLM-backed features and currently have no per-call cost attribution — the package closes that gap faster than a homegrown solution.
  • We need developer-facing observability during development/staging (why did this request cost what it cost, which calls were skipped) rather than a production billing pipeline.
  • We can live with 0.x API stability, or we can isolate it behind a small internal wrapper so a breaking change touches one file.
  • The team is on Symfony — despite the Laravel framing, the package ships as a bundle with a profiler panel, which is Symfony's idiom. Symfony shops get near drop-in value; Laravel teams would be adapting an integration, not installing one.

Look elsewhere or defer when:

  • We need production-grade, high-throughput cost metering as a system of record — a 0.x debug-oriented tool is not that, and a breaking interface in a minor release is a signal the contract is still moving.
  • We need vendor-neutral pricing data maintained as a service with SLAs and price-change notifications; a small-maintainer package puts that maintenance burden on us to track.
  • We require Laravel-native service providers, config publishing, and framework logging integration out of the box — evaluate the integration cost honestly rather than assuming parity.
  • Cost tracking is a compliance or invoicing requirement — that demands reconciliation, audit trails, and versioned price snapshots well beyond a profiler panel.

How to Pitch It (Stakeholders)

For executives: We currently cannot say what an LLM-backed request costs us, and we have no way to detect when that number is incomplete. This package is a small, low-cost instrument that attributes token spend per call and — as of v0.6.0 — explicitly reports calls it could not track. That second part matters more than it sounds: it is the difference between a cost figure we can quietly trust and one that could understate spend without anyone noticing. It is not a billing system; it is the instrumentation that tells us whether a billing system is even feasible. Recommend a time-boxed pilot in staging, not a production commitment.

For engineering: Adopt behind a thin internal adapter. v0.6.0 makes a breaking change to CostTrackerInterface to expose skipped calls — good change, real value, but it confirms the API is still in motion at 0.x. One wrapper class means the next break costs us an hour, not a sprint. Also flag the packaging: this is a Symfony bundle with a profiler panel. On Laravel we are writing glue, and that glue is the actual adoption cost — estimate it before committing. Upside: skipped-call visibility should immediately tell us whether our existing instrumentation is silently dropping traffic, which is worth knowing regardless of whether we keep the package.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings