feat: implement Sunset and Deprecation headers for legacy AI routes - #331
Merged
Merged
Conversation
…nd Redis sliding window rate limiter
Contributor
|
Awesome work on this! Thanks for the contribution 🚀 Merging now. |
ifygreg01-best
pushed a commit
to ifygreg01-best/ChainForge
that referenced
this pull request
Jul 23, 2026
…nd Redis sliding window rate limiter (ChainForgee#331)
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.
Closes #266
This pull request introduces RFC-compliant
SunsetandDeprecationheaders for all legacy/ai/*API paths, addressing the missing signals needed by mobile and frontend clients to migrate towards the versioned/v1/ai/*equivalents. Additionally, it integrates a Redis-based sliding window rate limiter to replace the in-process Map-based limiter.Verification Results
308 Temporary/Permanent Redirectcontaining the headersDeprecation: trueandSunset: Thu, 01 Oct 2026 00:00:00 GMTwhen using the default environment settings./ai/ocrreturns400/422with headers appended./health,/ai/metrics, etc.) are unaffected and do not emit these headers.