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',