Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/code/src/app/pricing/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import { CodeCTATracker } from "@/components/LandingTracker";
import { PricingPlans } from "@/components/PricingPlans";
import { Button } from "@/components/ui/button";
import { getConfig } from "@/lib/config-server";
import { formatUsageRatio, formatUsd } from "@/lib/utils";
import { formatUsageRatio } from "@/lib/utils";

import {
DEV_PLAN_PREMIUM_WEEKLY_LIMITS,
DEV_PLAN_PREMIUM_WEEKLY_PERCENT,
DEV_PLAN_PRICES,
getDevPlanCreditsLimit,
} from "@llmgateway/shared";
Expand Down Expand Up @@ -137,9 +137,9 @@ const usageRows: UsageRow[] = [
},
{
label: "Frontier flagship fair-use (Opus, GPT Pro, Gemini Pro, Grok)",
lite: `${formatUsd(DEV_PLAN_PREMIUM_WEEKLY_LIMITS.lite)}/wk`,
pro: `${formatUsd(DEV_PLAN_PREMIUM_WEEKLY_LIMITS.pro)}/wk`,
max: `${formatUsd(DEV_PLAN_PREMIUM_WEEKLY_LIMITS.max)}/wk`,
lite: `${Math.round(DEV_PLAN_PREMIUM_WEEKLY_PERCENT.lite * 100)}% of credits`,
pro: `${Math.round(DEV_PLAN_PREMIUM_WEEKLY_PERCENT.pro * 100)}% of credits`,
max: `${Math.round(DEV_PLAN_PREMIUM_WEEKLY_PERCENT.max * 100)}% of credits`,
},
{
label: "Priority routing on flagship models",
Expand Down
8 changes: 4 additions & 4 deletions apps/code/src/components/Faq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const faqData: FaqItem[] = [
{
question: "Are there limits on premium models?",
answer:
"Premium frontier models — Anthropic Opus, OpenAI Pro/reasoning, Gemini Pro, and Grok 4 — are subject to a weekly fair-use allowance in addition to your monthly allowance: $10/week on Lite, $50/week on Pro, and $140/week on Max. Every other model draws on your full monthly allowance. The exact numbers are published on the plan cards — no hidden throttling.",
"Premium frontier models — Anthropic Opus, OpenAI Pro/reasoning, Gemini Pro, and Grok 4 — are subject to a weekly fair-use allowance in addition to your monthly allowance: 12% of your monthly credits on Lite, 15% on Pro, and 18% on Max. Every other model draws on your full monthly allowance. The exact numbers are published on the plan cards — no hidden throttling.",
content: (
<>
<p>
Expand All @@ -100,13 +100,13 @@ const faqData: FaqItem[] = [
</p>
<ul className="list-disc pl-6 mt-2 space-y-1">
<li>
<strong>Lite:</strong> $10/week
<strong>Lite:</strong> 12% of monthly credits
</li>
<li>
<strong>Pro:</strong> $50/week
<strong>Pro:</strong> 15% of monthly credits
</li>
<li>
<strong>Max:</strong> $140/week
<strong>Max:</strong> 18% of monthly credits
</li>
</ul>
<p className="mt-3">
Expand Down
9 changes: 6 additions & 3 deletions apps/code/src/components/PricingPlans.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Button } from "@/components/ui/button";
import { formatUsageRatio } from "@/lib/utils";

import {
DEV_PLAN_PREMIUM_WEEKLY_LIMITS,
DEV_PLAN_PREMIUM_WEEKLY_PERCENT,
DEV_PLAN_PRICES,
MARKETING_STATS,
type DevPlanTier,
Expand Down Expand Up @@ -48,7 +48,7 @@ const plans: PlanContent[] = [
features: [
"Everything in Lite",
"Headroom for a full agent session every day",
"5× the frontier fair-use of Lite",
"More frontier fair-use headroom than Lite",
"Priority routing on flagship models",
],
},
Expand Down Expand Up @@ -159,7 +159,10 @@ export function PricingPlans({ credits, paygoUrl }: PricingPlansProps) {
Frontier fair-use
</dt>
<dd className="font-mono text-xs font-semibold tabular-nums">
${DEV_PLAN_PREMIUM_WEEKLY_LIMITS[plan.tier]} / week
{Math.round(
DEV_PLAN_PREMIUM_WEEKLY_PERCENT[plan.tier] * 100,
)}
% of credits
</dd>
</div>
<div className="flex items-center justify-between gap-3 px-3.5 py-2">
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/content/learn/model-categories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ You can browse the full catalog on the [**Supported Models**](https://llmgateway
limited only by your credit balance, with no weekly cap.
</Callout>

Premium models are the most expensive to run, so DevPass plans apply a **weekly fair-use cap** on premium usage. This is a rolling 7-day window that resets continuously — it sits on top of the plan's normal monthly credit allowance.
Premium models are the most expensive to run, so DevPass plans apply a **weekly fair-use cap** on premium usage. This is a rolling 7-day window that resets continuously — it sits on top of the plan's normal monthly credit allowance. The cap scales with each plan: it's a share of that plan's total monthly credits, so higher tiers get a larger weekly premium allowance.

| DevPass plan | Premium fair-use cap |
| ------------ | -------------------- |
| **Lite** | 10 credits / week |
| **Pro** | 50 credits / week |
| **Max** | 140 credits / week |
| DevPass plan | Premium fair-use cap (per week) |
| ------------ | ------------------------------- |
| **Lite** | 12% of monthly credits |
| **Pro** | 15% of monthly credits |
| **Max** | 18% of monthly credits |

<Callout type="info">
Within DevPass, the weekly cap applies only to **premium** models. Standard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Building on the [embeddable wallets SDK](https://llmgateway.io/blog/embeddable-a

## Model Categories & Fair-Use Caps

Every model is now categorized as **Premium** or **Standard**, powering dashboard filters and analytics. For **DevPass** coding plans, premium models get a rolling weekly fair-use cap (10/50/140 credits for Lite/Pro/Max) so flagship capacity stays available for everyone — the API and pay-as-you-go credits are unaffected.
Every model is now categorized as **Premium** or **Standard**, powering dashboard filters and analytics. For **DevPass** coding plans, premium models get a rolling weekly fair-use cap (12%/15%/18% of monthly credits for Lite/Pro/Max) so flagship capacity stays available for everyone — the API and pay-as-you-go credits are unaffected.

[How categories and caps work →](https://docs.llmgateway.io/learn/model-categories)

Expand Down
18 changes: 10 additions & 8 deletions packages/shared/src/dev-plans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,20 @@ export function getDevPlanCreditsLimit(tier: DevPlanTier): number {
}

/**
* Weekly fair-use allowance for premium-category models per tier.
* Premium models (frontier flagships) are subject to this weekly cap in
* addition to the monthly credit allowance.
* Weekly fair-use allowance for premium-category models per tier, expressed as
* a fraction of the tier's total monthly credit allowance. Premium models
* (frontier flagships) are subject to this weekly cap in addition to the
* monthly credit allowance. Deriving from the monthly limit keeps the ratio
* exact regardless of DEV_PLAN_CREDITS_MULTIPLIER.
*/
export const DEV_PLAN_PREMIUM_WEEKLY_LIMITS: Record<DevPlanTier, number> = {
lite: 10,
pro: 50,
max: 140,
export const DEV_PLAN_PREMIUM_WEEKLY_PERCENT: Record<DevPlanTier, number> = {
lite: 0.12,
pro: 0.15,
max: 0.18,
};

export function getDevPlanPremiumWeeklyLimit(tier: DevPlanTier): number {
return DEV_PLAN_PREMIUM_WEEKLY_LIMITS[tier];
return getDevPlanCreditsLimit(tier) * DEV_PLAN_PREMIUM_WEEKLY_PERCENT[tier];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update public premium-cap documentation

Since this now enforces the cap as getDevPlanCreditsLimit(tier) * percent, the default limits become 8.70/35.55/107.40 credits, but the current published docs still list 10/50/140 credits in apps/docs/content/learn/model-categories.mdx lines 37-41. Users on Lite/Pro/Max can be blocked much earlier than the documented allowance, so update the docs or derive the displayed caps from the shared helper in the same change.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the pricing-page cap copy

Fresh evidence after the earlier docs comment: this calculation now makes the default caps $8.70 / $35.55 / $107.40, but the public DevPass pricing page still advertises the old $10 / $50 / $140 allowance in apps/code/src/app/pricing/page.tsx:302-307 (confirmed with repo-wide rg for the old values). Users can choose a plan from that page expecting a higher premium allowance than the gateway now enforces, so update or derive that copy from the shared helper as part of this change.

Useful? React with 👍 / 👎.

}

export const DEV_PLAN_PREMIUM_WEEK_LENGTH_MS = 7 * 24 * 60 * 60 * 1000;
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export {

export {
DEV_PLAN_PREMIUM_WEEK_LENGTH_MS,
DEV_PLAN_PREMIUM_WEEKLY_LIMITS,
DEV_PLAN_PREMIUM_WEEKLY_PERCENT,
DEV_PLAN_PRICES,
type DevPlanCycle,
type DevPlanTier,
Expand Down
Loading