fix: add Cache-Control no-store to AI API responses to prevent caching of dynamic content#2594
fix: add Cache-Control no-store to AI API responses to prevent caching of dynamic content#2594tmdeveloper007 wants to merge 2 commits into
Conversation
|
Someone is attempting to deploy a commit to the Nisshchaya's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 11 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
✨ Finishing Touches🧪 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 |
🎉 Thanks for your contribution, @tmdeveloper007!Your PR has passed our automated GSSoC quality checks. Here's a quick summary:
A maintainer will review your PR soon. Please be patient and available for feedback. 💪 GSSoC'26 automation · Maintainer: @nisshchayarathi |
Cherry-picked from upstream fix branch: - lib/services/bitbucketService.ts: String() wrapping - lib/services/gitlabService.ts: String() wrapping - src/components/repository/ContributorIssueRecommendations.tsx: stub - src/components/repository/RepositoryInsights.tsx: remove invalid repository prop - src/components/visualizations/CodeDependencyGraph.tsx: remove graphData from dependency array
…dpoints, 403-to-404 in annotations, and clear permission errors
f749ffd to
a0ad604
Compare
🎉 Thanks for your contribution, @tmdeveloper007!Your PR has passed our automated GSSoC quality checks. Here's a quick summary:
A maintainer will review your PR soon. Please be patient and available for feedback. 💪 GSSoC'26 automation · Maintainer: @nisshchayarathi |
Summary
The AI-powered API endpoints (
/api/ai/chat,/api/ai/compare,/api/ai/analyze-repository) return dynamically generated content that should never be cached. Without explicitCache-Controlheaders, intermediate proxies and browsers may cache these responses, leading to stale or inconsistent data.Fix
Added
Cache-Control: no-storeheader to allNextResponsereturn statements in the three AI API routes. This ensures:Changes
app/api/ai/chat/route.ts: AddedCache-Control: no-storeto all responsesapp/api/ai/compare/route.ts: AddedCache-Control: no-storeto all responsesapp/api/ai/analyze-repository/route.ts: AddedCache-Control: no-storeto all responsesRelated Issue
Fixes #467