Repository navigation
Propose honoring stated retry times (add-retry-after) - #114
Merged
Merged
Conversation
Spec for cooling a rate-limited endpoint for the retry time its error states, read from the body now and from Retry-After once Switchyard exposes it (NVIDIA-NeMo/Switchyard#904). Step 1 of replacing ModelRelay. Spec only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Gary Schaetz <gary@schaetzkc.com>
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.
Spec only, for review (no code). Step 1 of Replacing ModelRelay.
The situation
Switchyard 0.3.0 parses
Retry-Afterbut only uses it for its own internal retries; the error it returns to a library user (UpstreamHttp { status, body }) does not carry it. Upstream PR NVIDIA-NeMo/Switchyard#904 (closing #903) adds the headers; it is open and unmerged. I added our use case to #903.What this proposes
try again in 7.66s,retryDelay,retry_after, ...), 429 and 503 only, first 4 KiB, bounded to 1 s tomax_retry_after_secs(default 300).max_cooldown_secs); no hint means today behavior unchanged.retry_after(error), so adopting the header after #904 releases is a one-function change.Amends ADR 0018 rather than adding one. Not in scope:
x-ratelimit-*headers, predicting limits, changing Switchyard retries.🤖 Generated with Claude Code