Repository navigation
feat(client): retry a quote the router is too busy for after its retry-after - #48
Merged
Merged
Conversation
…y-after The router's quote gate answers a quote it is too busy to compute with 503 and Retry-After: 1. request() now waits that out and retries once, so a burst of load costs the caller a second rather than an error. Only a 503 with a Retry-After of at most 5 seconds is retried; a 429, any other 503 and a second busy 503 are thrown as HTTPError as before. Aborting the request's signal ends the wait.
txnlab-release-bot Bot
added a commit
that referenced
this pull request
Nov 16, 2026
# [3.6.0](v3.5.0...v3.6.0) (2026-11-16) ### Features * **client:** retry a quote the router is too busy for after its retry-after ([#48](#48)) ([8c37aa2](8c37aa2))
Contributor
|
🎉 This PR is included in version 3.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
The router now bounds how many quotes a pod computes at once (TxnLab/haystack-router
quoteGate, live on mainnet with the next router deploy). A quote it's too busy for, or one that runs past its 10 s deadline, is answered503 Service UnavailablewithRetry-After: 1.request()now waits out thatRetry-Afterand retries once, so a burst of load costs the caller a second rather than an error.503whoseRetry-Afteris a number of seconds from 0 to 5.HTTPError, as before: a429, any other503(no header, longer, or HTTP-date), and a second busy503.options.signalends the wait.The README's Error Handling section and
.claude/CLAUDE.mddescribe it. The developer docs already say "3.6.0 and later".Release
feat→ 3.6.0. It also releases the unreleased #45 (refactor(client): Tinyman v1 options deprecated as no-ops). hay.app and the mobile app pick up the retry when they bump the SDK.Tests
pnpm run cipasses: build, lint, format, typecheck and 284 tests. The 10 newrequesttests run on fake timers and cover:Retry-After;503thrown;429not retried;