All Posts
March 11, 20261.0.137SaaS Factory

v1.0.137 — feat: Per-Project AI Cost & Token Usage Dashboard with Budget Alerts


title: "Release v1.0.137: Per-Project AI Cost & Token Usage Dashboard with Budget Alerts" date: 2026-03-11 version: 1.0.137

What changed

  • New AI Cost Dashboard — per-project page at /dashboard/products/[id]/ai-cost with four tabs: by-agent breakdown, 6-month spend trend, top pipelines by cost, and recent credit deductions
  • Budget alert bar — visual progress indicator that turns green → yellow → red as monthly credit consumption approaches and exceeds the configured limit
  • 5 new tRPC procedures (aiCostRouter) — monthly summary, trend series, cross-project rollup, budget setter, and recent transactions; all scoped to project ownership
  • Sidebar nav — new Operations → AI Cost & Budget entry added to the product sidebar

Why it matters

The platform deducts credits per agent run but previously had no visibility into where those credits went. This release gives teams a clear breakdown of which agents are consuming the most — per project — so cost governance and ROI measurement are no longer guesswork.

Technical notes

  • creditTransactions joined to agentJobs → pipelineRuns for project-scoped queries
  • Budget limits stored in billingSettings under key ai_budget_monthly_limit
  • Page uses force-dynamic for auth safety on each request
  • New ai-cost.test.ts added; vitest.config.ts CRLF → LF fix included

Release Notes

Everything is done. Here's the full summary:


✅ Release v1.0.137 Published

Merge Status

PR #137's head branch (feat/ai-cost-dashboard) was already deleted — its code was already present on main — so the merge step was skipped and the release was created directly from main.

🏷️ Release Created


What's in this release (18 files · +3,918 / -18 lines)

AreaWhat Shipped
🆕 AI Cost DashboardNew page at /dashboard/products/[id]/ai-cost with 4 tabs: by-agent breakdown, 6-month trend, top pipelines, recent runs
💰 Budget AlertsVisual progress bar — green/yellow/red based on % of monthly credit limit consumed
🔌 aiCostRouter5 new tRPC procedures: monthly summary, trend, cross-project rollup, budget setter, recent transactions
🧭 SidebarNew Operations → AI Cost & Budget nav item with Coins icon
🔄 One-Click RollbackNew rollbackRouter, rollbackEvents DB table, and rollback/initiate Inngest event
🤖 MCP IntegrationMCP server registry schema, curated catalog (8 categories), and management router with encrypted credentials
📊 Portfolio & Agent RoutersCross-project portfolio summaries, agent coordination visibility, natural language chat/intent parsing
💳 Platform BillingSeparate Stripe router for SaaS Factory platform plans (Free/Pro/Enterprise)
🧪 Tests & ConfigNew ai-cost.test.ts, improved mock stability in autofix tests, CRLF→LF fix in vitest.config.ts