From defb4186b425f2ba04f3e55996f108f6043fb89f Mon Sep 17 00:00:00 2001 From: Marco Sadjadi Date: Sun, 24 May 2026 00:14:07 +0200 Subject: [PATCH] fix(quotas): tighten Team/Enterprise daily preview caps to stay profitable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The earlier caps (Team 150/day, Enterprise 1000/day) used Sonnet/Opus pricing that put max-usage above the tier's monthly revenue — a Bot with a Team subscription could out-cost €199 in Anthropic spend. Drop to 50/day Team and 200/day Enterprise; both now keep ~55-65% margin even when maxed. Pricing page Team feature line updated to match (150 -> 50). Build caps loosened slightly less since the 24h cache TTL makes most builds cache-hits. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/api/src/lib/rate-limit.ts | 21 ++++++++++++++++----- apps/web/app/(marketing)/pricing/page.tsx | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/apps/api/src/lib/rate-limit.ts b/apps/api/src/lib/rate-limit.ts index 0fcf3df..d8d671d 100644 --- a/apps/api/src/lib/rate-limit.ts +++ b/apps/api/src/lib/rate-limit.ts @@ -35,17 +35,28 @@ export async function checkDailyLimit( } // Per-tier daily limits on the two LLM-priced actions. -// Preview = ~€0.002-0.015/call · Build = ~€0.005-0.22/call. +// Preview = ~€0.002-0.115/call (model-dependent) · Build = ~€0.005-0.22/call. +// +// Caps are set so that even a max-usage power-user stays profitable at the +// tier's price point. Critical for Team/Enterprise where Sonnet/Opus tokens +// add up fast — a runaway Bot with a Team subscription could otherwise +// out-cost the €199 monthly revenue. Math (max-case): +// Pro: 40 prev × €0.020 × 30 = €24/mo → margin €25 (~50%) +// Team: 50 prev × €0.058 × 30 = €87/mo → margin €112 (~56%) +// Enterprise: 200 prev × €0.060 × 30 = €360/mo → margin €639 (~64%) +// Build caps are looser because the 24h cache TTL means most builds are +// cache-HITS (no LLM call) — the cap is mostly about runner-port / hosting +// budget, not token cost. export const PREVIEW_DAILY_LIMIT: Record = { hobby: 5, pro: 40, - team: 150, - enterprise: 1000, + team: 50, + enterprise: 200, }; export const BUILD_DAILY_LIMIT: Record = { hobby: 3, pro: 20, - team: 100, - enterprise: 500, + team: 30, + enterprise: 100, }; diff --git a/apps/web/app/(marketing)/pricing/page.tsx b/apps/web/app/(marketing)/pricing/page.tsx index 52dde61..dc83f1f 100644 --- a/apps/web/app/(marketing)/pricing/page.tsx +++ b/apps/web/app/(marketing)/pricing/page.tsx @@ -55,7 +55,7 @@ const TIERS = [ features: [ '25 MCP servers', '10M tool calls / month', - '150 prompt analyses / day', + '50 prompt analyses / day', 'RBAC + extended audit log', '99.9% uptime SLA', 'Shared Slack channel support',