Skip to content

feat: bump tier limits -- free 1 repo/10K fn, pro 5, enterprise 10 (OPE-124)#277

Merged
DevanshuNEU merged 1 commit into
OpenCodeIntel:mainfrom
DevanshuNEU:feat/bump-tier-limits
Mar 3, 2026
Merged

feat: bump tier limits -- free 1 repo/10K fn, pro 5, enterprise 10 (OPE-124)#277
DevanshuNEU merged 1 commit into
OpenCodeIntel:mainfrom
DevanshuNEU:feat/bump-tier-limits

Conversation

@DevanshuNEU

@DevanshuNEU DevanshuNEU commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

New Tier Limits

Free (was) Free (now) Pro (was) Pro (now) Enterprise (was) Enterprise (now)
Repos 3 1 20 5 unlimited 10
Files/repo 500 2,000 5,000 5,000 50,000 50,000
Functions/repo 2,000 10,000 20,000 100,000 500,000 500,000

Why

Free tier at 2K functions couldn't index Flask, couldn't index our own repo. Users never saw the value. 1 repo with 10K functions lets them index a real codebase and experience semantic search on their actual code. That's the conversion trigger.

Cost: 10K functions = ~2M tokens = $0.04/user in OpenAI embeddings.

Files

  • backend/services/user_limits.py (TIER_LIMITS values)
  • frontend/src/config/api.ts (MAX_FREE_REPOS, TIER_FUNCTION_LIMITS)
  • frontend/src/pages/UsagePage.tsx (CTA text: 20 repos -> 5 repos)

3 files, 9 insertions, 9 deletions. Net zero lines.

Closes OPE-124

Summary by CodeRabbit

  • Changes
    • Adjusted subscription tier resource limits:
      • FREE tier: repository limit reduced (now 1); per-repo file and function limits increased.
      • PRO tier: repository limit reduced (now 5); per-repo function limit increased.
      • ENTERPRISE tier: repository limit added (now 10); other limits unchanged.
    • Updated Upgrade messaging in the UI to reflect new tier allocations.

@vercel

vercel Bot commented Mar 3, 2026

Copy link
Copy Markdown

@DevanshuNEU is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Mar 3, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Tier resource limits were adjusted across backend and frontend: FREE and PRO repo limits reduced, FREE/PRO function limits increased, ENTERPRISE repo limit set to 10; frontend constants/types and a UsagePage CTA were updated to match.

Changes

Cohort / File(s) Summary
Backend tier configuration
backend/services/user_limits.py
Updated TIER_LIMITS: FREE max_repos 3→1, max_files_per_repo 500→2000, max_functions_per_repo 2000→10000; PRO max_repos 20→5; ENTERPRISE max_repos None→10 (other limits unchanged).
Frontend configuration and types
frontend/src/config/api.ts
Updated MAX_FREE_REPOS 3→1; TIER_FUNCTION_LIMITS updated (free 2_000→10_000, pro 20_000→100_000, enterprise unchanged); added exported type TierName = keyof typeof TIER_FUNCTION_LIMITS.
Frontend UI messaging
frontend/src/pages/UsagePage.tsx
Updated Upgrade / Pro plan display text from "20 repos, 20K functions/repo" to "5 repos, 100K functions/repo" to reflect new limits.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Limits hop and numbers sway,
One free repo now leads the way.
Pro trimmed to five, functions soar,
Enterprise steadies to ten — encore!
Config carrots bounced from end to end. 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and concisely summarizes the main change: updating tier limits with specific numbers for Free, Pro, and Enterprise plans, matching the core changeset.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/src/pages/UsagePage.tsx (1)

40-41: ⚠️ Potential issue | 🟡 Minor

Fallback limits are stale after this tier-limit update.

Line 40 and Line 41 still default to the old Free limits (3 repos, 2000 functions). If the API payload is partial, the page will show incorrect plan limits.

Suggested fix
-  const repos = usage.repositories || { current: 0, limit: 3 }
-  const limits = usage.limits || { max_files_per_repo: 500, max_functions_per_repo: 2000 }
+  const repos = usage.repositories || { current: 0, limit: 1 }
+  const limits = usage.limits || { max_files_per_repo: 2000, max_functions_per_repo: 10000 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/pages/UsagePage.tsx` around lines 40 - 41, The fallback values
for repos and limits (variables repos and limits derived from usage.repositories
and usage.limits) are still the old Free-tier numbers; replace these hardcoded
defaults with the updated plan defaults (or import a shared DEFAULT_PLAN_LIMITS
constant) and ensure partial API payloads are merged with those defaults (e.g.,
use a merged object like {...DEFAULT_REPOS_FALLBACK, ...usage.repositories} and
{...DEFAULT_LIMITS_FALLBACK, ...usage.limits} or equivalent nullish-coalescing)
so the page shows correct limits even when the API returns a partial payload.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@frontend/src/pages/UsagePage.tsx`:
- Around line 40-41: The fallback values for repos and limits (variables repos
and limits derived from usage.repositories and usage.limits) are still the old
Free-tier numbers; replace these hardcoded defaults with the updated plan
defaults (or import a shared DEFAULT_PLAN_LIMITS constant) and ensure partial
API payloads are merged with those defaults (e.g., use a merged object like
{...DEFAULT_REPOS_FALLBACK, ...usage.repositories} and
{...DEFAULT_LIMITS_FALLBACK, ...usage.limits} or equivalent nullish-coalescing)
so the page shows correct limits even when the API returns a partial payload.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adc33d6 and f95210f.

📒 Files selected for processing (3)
  • backend/services/user_limits.py
  • frontend/src/config/api.ts
  • frontend/src/pages/UsagePage.tsx

…(OPE-124)

Free:       3 repos/500 files/2K fn  -> 1 repo/2K files/10K fn
Pro:        20 repos/5K files/20K fn -> 5 repos/5K files/100K fn
Enterprise: unlimited/50K files/500K fn -> 10 repos/50K files/500K fn

Free: one repo, fully indexed, real codebase experience.
Pro: 100K functions covers even large monorepos like Effect-TS.
Enterprise: 10 repos with massive limits per repo.

Closes OPE-124
@DevanshuNEU DevanshuNEU force-pushed the feat/bump-tier-limits branch from f95210f to ddb603a Compare March 3, 2026 16:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
frontend/src/pages/UsagePage.tsx (1)

69-69: Avoid hardcoded plan limits in CTA copy.

Line 69 hardcodes Pro limits in UI text. This is prone to drift when limits change again. Source this string (or at least the numeric limits) from shared tier-limit config so product copy and enforcement stay aligned.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/pages/UsagePage.tsx` at line 69, The CTA currently hardcodes Pro
limits ("Pro: 5 repos, 100K functions/repo, Cohere reranking") in UsagePage.tsx;
replace that literal with values pulled from the shared tier-limit configuration
(e.g., import the shared PLAN_LIMITS or tierLimits object) and build the display
string from its properties (repos, functionsPerRepo, rerankingFeature) inside
the UsagePage component so UI copy stays in sync with enforcement; also provide
a sensible fallback or localized formatter when the config keys are absent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@backend/services/user_limits.py`:
- Line 60: The Pro plan's max_functions_per_repo is incorrectly set to 100000;
update the Pro configuration in backend/services/user_limits.py so the
max_functions_per_repo for the Pro plan (where the Pro entry is defined—look for
the Pro key or constant in the user limits mapping) is 20000 to match the PR
objective, and run/adjust any related unit tests or fixtures that assert this
value (refer to the mapping or function that returns plan limits such as the Pro
entry in the limits dict).

---

Nitpick comments:
In `@frontend/src/pages/UsagePage.tsx`:
- Line 69: The CTA currently hardcodes Pro limits ("Pro: 5 repos, 100K
functions/repo, Cohere reranking") in UsagePage.tsx; replace that literal with
values pulled from the shared tier-limit configuration (e.g., import the shared
PLAN_LIMITS or tierLimits object) and build the display string from its
properties (repos, functionsPerRepo, rerankingFeature) inside the UsagePage
component so UI copy stays in sync with enforcement; also provide a sensible
fallback or localized formatter when the config keys are absent.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f95210f and ddb603a.

📒 Files selected for processing (3)
  • backend/services/user_limits.py
  • frontend/src/config/api.ts
  • frontend/src/pages/UsagePage.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/config/api.ts

Comment thread backend/services/user_limits.py
@vercel

vercel Bot commented Mar 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
opencodeintel Ready Ready Preview, Comment Mar 3, 2026 5:00pm

@DevanshuNEU DevanshuNEU merged commit 8cf0589 into OpenCodeIntel:main Mar 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant