fix(limits): updated rate limiter to match execution timeouts, adjusted timeouts fallback to be free plan#3136
Merged
waleedlatif1 merged 2 commits intostagingfrom Feb 4, 2026
Merged
Conversation
…ed timeouts fallback to be free plan
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile OverviewGreptile SummaryThis PR addresses timeout and rate limit consistency by aligning both systems to use free plan defaults when billing is disabled. Key Changes:
The changes improve consistency between execution timeouts and rate limiting, ensuring both systems behave predictably when billing is disabled. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant RateLimiter
participant getRateLimit
participant FeatureFlags
participant Storage
Client->>RateLimiter: checkRateLimitWithSubscription(userId, subscription, triggerType, isAsync)
alt triggerType === 'manual'
RateLimiter-->>Client: return unlimited result
else
RateLimiter->>RateLimiter: determine plan (subscription?.plan || 'free')
RateLimiter->>RateLimiter: getCounterType(triggerType, isAsync)
RateLimiter->>getRateLimit: getRateLimit(plan, counterType)
getRateLimit->>getRateLimit: toConfigKey(counterType)
getRateLimit->>FeatureFlags: check isBillingEnabled
alt !isBillingEnabled
getRateLimit-->>RateLimiter: return RATE_LIMITS.free[key]
else
getRateLimit-->>RateLimiter: return RATE_LIMITS[plan || 'free'][key]
end
RateLimiter->>Storage: consumeTokens(storageKey, 1, config)
Storage-->>RateLimiter: ConsumeResult
RateLimiter-->>Client: return RateLimitResult
end
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing
- No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Cursor Bugbot reviewed your changes and found no issues for commit bf02231