Repository navigation
feat(devpass): premium cap as % of credits #2835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6ad9d63
f58de27
4e655ba
c9406ef
b301b28
0e40ba8
2fc6164
77e33b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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]; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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 Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| export const DEV_PLAN_PREMIUM_WEEK_LENGTH_MS = 7 * 24 * 60 * 60 * 1000; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 inapps/docs/content/learn/model-categories.mdxlines 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 👍 / 👎.