jkudish/laravel-ai-pricing
A Laravel package for calculating and tracking AI model costs. Define pricing for providers like OpenAI and Anthropic in config, estimate token-based expenses per request, and keep cost logic centralized so you can bill users, monitor spend, or compare models.
openrouter:deepseek/deepseek-v4.1-flash-1017-standard-max — so a per-request cost number can be attached to a specific, auditable price definition rather than a live, drifting catalog. That is the input to gross-margin math, credit/pack pricing, and free-tier limits.deepseek/deepseek-v4.1-flash-20261017) alongside its OpenRouter binding, PMs can compare a candidate model against incumbents on a like-for-like cost basis before committing a roadmap slot to a migration.openrouter:deepseek/deepseek-v4.1-flash-1017 identity fallback-blocked: it can no longer silently resolve to a cheaper live catalog or a vendor headline price. Downstream products must either quote the qualified -standard-max basis (where its conditions hold) or explicitly configure the generic identity. This is exactly the kind of change that should route through a PM-visible release note, not just an engineering ticket.Consider adoption when:
Look elsewhere, or scope carefully, when:
For executives (one paragraph). We are adopting a small Laravel package that turns "what does an AI request cost us?" into a versioned, auditable number instead of a vendor marketing figure. It pins model pricing to a dated snapshot, quotes against a named basis so the figure is reproducible, and deliberately uses the highest rate across routing endpoints — meaning our margin and budget models will be conservative, not flattering. The trade-off is bounded and known: batch pricing, opt-in service tiers, cache writes, and server tools are not covered, and the snapshot must be re-reviewed when the upstream endpoint list changes. The latest release is a pricing snapshot plus one governance change that blocks silent price fallback — a safety improvement, but it needs a short migration before we upgrade.
For engineering (one paragraph). Integrate against the qualified basis identity (openrouter:deepseek/deepseek-v4.1-flash-1017-standard-max) for anything that meters, quotes, or caps spend; treat the generic identity as requiring explicit configuration. v0.4.2 is a behavioral change, not just a data refresh: the generic identity is fallback-blocked and the -standard-max basis is itself fallback-blocked and not an alias, so no silent resolution will occur. Budget for a migration pass, an assertion that cost lookups fail loudly rather than defaulting, and a recurring re-review trigger tied to endpoint churn. Do not derive customer-facing invoices for batch or tiered traffic from this snapshot until coverage is confirmed.
How can I help you explore Laravel packages today?