Repository navigation
feat(devpass): premium cap as % of credits - #2835
Conversation
Make the DevPass premium weekly fair-use cap a fraction of each tier's total monthly credit allowance instead of a hardcoded dollar amount: 10% (Lite), 15% (Pro), 20% (Max). Deriving from getDevPlanCreditsLimit keeps the ratio exact regardless of DEV_PLAN_CREDITS_MULTIPLIER. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughShared dev plan premium weekly caps now derive from tier percentages of monthly credits, and pricing copy, documentation, FAQ content, and the changelog describe that cap format. ChangesDev plan premium weekly cap update
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ad9d633ec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| 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.
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 👍 / 👎.
Update model-categories docs and the 2026-06-10 changelog entry to reflect the premium weekly fair-use cap now being 10%/15%/20% of monthly credits (Lite/Pro/Max) instead of fixed 10/50/140 credit amounts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f58de27f8c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| 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.
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 👍 / 👎.
## Context The `e2e` job on theopenco#2835 failed on six provider/model mappings. I reproduced each failure locally against the live providers (gateway on :4001, real keys) to find the root cause. The CI "33s / retry x5" is just retry backoff over **fast** errors, so the local errors match what CI hit. ## Findings | Model | Reproduced error | Root cause | Action | |---|---|---|---| | `moonshot/kimi-k2-thinking` | `404 resource_not_found` | Moonshot retired the kimi-k2-thinking line (live `/v1/models` only lists k2.5/k2.6/k2.7); BytePlus Ark dropped every snapshot too | **Fixed here** | | `sakana/fugu-ultra` | `403 Forbidden` (HTML, `via: 1.1 google`) | Google edge/WAF blocks **all** requests incl. unauthenticated `/` — geo/WAF block from test infra, not a mapping/URL bug | Infra (see below) | | `azure-ai-foundry/grok-4-1-fast-reasoning` | `404 DeploymentNotFound` | Foundry resource has no grok deployment (404 for every name) | Infra (unprovisioned) | | `azure/gpt-oss-120b` | `404 DeploymentNotFound` | Azure resource has **zero** deployments (`data: []`) | Infra (unprovisioned) | | `together-ai/gpt-oss-120b` | `503 Service Unavailable` | Provider-side outage (single/multi-turn passed in CI; the tool-call test caught the blip) | Transient | | `aws-bedrock/claude-sonnet-4-6` | **Works now** (valid tool_call) | CI failure was a ~32s cold-start timeout, not an error | Transient flake | ## Change Only the Moonshot failure is a real, code-fixable mapping bug. This PR deactivates the retired `kimi-k2-thinking` mappings: - `moonshot/kimi-k2-thinking` → `deactivatedAt` - `bytedance/kimi-k2-thinking` (`-251104`) → `deactivatedAt` - `moonshot/kimi-k2-thinking-turbo` → `deactivatedAt` The model keeps its `alibaba` provider (`test: skip`, active until its own `2026-07-08` deactivation), so it is not orphaned. The other five are **not mapping bugs**: two are unprovisioned Azure resources (deployments need creating), one is a geo/WAF block on Sakana's endpoint, and two are transient provider hiccups. None are fixable by editing model definitions — flagging for an infra decision (provision the Azure deployments; confirm whether Sakana is reachable from gateway infra, else mark `test: "skip"`). ## Verification - `turbo run build` — 17/17 ✓ - `providers.spec` / `model-metadata.spec` / `compliance.spec` — 36/36 ✓ - Live re-test: moonshot/bytedance kimi-k2-thinking all 404; mappings now excluded from e2e 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated Moonshot model availability by deactivating select offerings. * Added a deactivation timestamp for the kimi-k2-thinking family providers (including kimi-k2-thinking-251104 and kimi-k2-thinking-turbo) as of 2026-06-28. * Ensures affected options clearly reflect their unavailability date. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Merge origin/main and adapt apps/code PricingPlans (new consumer on main) to the percentage-based premium weekly cap. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Update the remaining user-facing DevPass premium fair-use mentions from the old $10/$50/$140 weekly amounts to 12%/15%/18% of monthly credits: the pricing page footnote and both the FAQ data string and its hardcoded accordion list. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…y-percent # Conflicts: # apps/code/src/app/pricing/page.tsx # apps/code/src/components/Faq.tsx # apps/code/src/components/PricingPlans.tsx
Re-apply percentage-based premium fair-use (12/15/18%) onto main's rewritten pricing page, FAQ, and plan cards after merge; fix the now- inaccurate '5x the frontier fair-use of Lite' Pro bullet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
What
Changes the DevPass premium-model weekly fair-use cap from hardcoded dollar amounts to a fraction of each tier's total monthly credit allowance:
Why
Previously the cap was a fixed
10 / 50 / 140credits per tier, independent of the monthly allowance. That made the premium share of total credits drift and would silently change ifDEV_PLAN_CREDITS_MULTIPLIERwere adjusted.Deriving the cap from
getDevPlanCreditsLimit(tier)keeps the 12/15/18% ratio exact regardless of the multiplier. At the default 3× multiplier the new weekly caps are:Changes
packages/shared/src/dev-plans.ts: replaceDEV_PLAN_PREMIUM_WEEKLY_LIMITS(absolute) withDEV_PLAN_PREMIUM_WEEKLY_PERCENT(fraction);getDevPlanPremiumWeeklyLimitnow returnsmonthlyLimit × percent.packages/shared/src/index.ts: update re-export.apps/docs/content/learn/model-categories.mdx: fair-use table now shows % of monthly credits.apps/ui/src/content/changelog/2026-06-10-...md: updated to the percentage wording.The cap is consumed only via
getDevPlanPremiumWeeklyLimit→getRemainingPremiumWeeklyAllowance(gateway enforcement), so no call-site changes were needed. The reset cycle (rolling 7-day window) is unchanged.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation