Skip to content

Comments

Add rate limiting to generate description API#72

Merged
bc-rmalyavc merged 1 commit intomainfrom
codex/implement-rate-limits-for-generatedescription
Dec 17, 2025
Merged

Add rate limiting to generate description API#72
bc-rmalyavc merged 1 commit intomainfrom
codex/implement-rate-limits-for-generatedescription

Conversation

@bc-rmalyavc
Copy link
Contributor

@bc-rmalyavc bc-rmalyavc commented Dec 15, 2025

Summary

  • add a Firestore-backed rate limiter for the generate description endpoint to cap request bursts
  • return standard rate limit headers and 429 responses when over limit

Testing

  • Manually tested on dev. Executed 70 requests in multiple threads using the ffuf tool and made sure that requests beyond 60 per minute are blocked by the new rate limit. Also ensured that the app returns info regarding rate limits, remaining requests and time to reset in appropriate headers
image image

Codex Task

@bc-rmalyavc bc-rmalyavc requested a review from a team as a code owner December 15, 2025 14:01
@vercel
Copy link

vercel bot commented Dec 15, 2025

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

Project Deployment Review Updated (UTC)
ai-app-foundation Ready Ready Preview, Comment Dec 17, 2025 2:10pm

Use atomic increments for rate limit counters

Use server reads for rate limit counts

Shard rate limit counters to reduce contention

Add TTL expiration to rate limit shards

Add rate limiting to generate description API
@bc-rmalyavc bc-rmalyavc force-pushed the codex/implement-rate-limits-for-generatedescription branch from 77cfb07 to a9a5cc5 Compare December 17, 2025 14:09
@bc-rmalyavc bc-rmalyavc merged commit 2cd4478 into main Dec 17, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants