Ask the Gateway again after a 503 before paying OpenRouter - #89
Merged
Merged
Conversation
A quarter of judge calls came back 503 from the Gateway in about a second and were paid for on OpenRouter. They arrive in short spells and clear on a wait of under two seconds. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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.
A quarter of judge calls (507 of 2,047 measured locally on 2026-09-19, and about a third in prod) come back 503 from Vercel's AI Gateway in about a second and are then paid for on OpenRouter. The 503s arrive in short spells and are not tied to request size: in a probe of 80 calls, 9 hit a 503, 8 cleared after a 400ms wait and the last after a further 1.2s.
askGatewaynow waits 400ms, then 1200ms, and asks the Gateway again on a 503 before falling back. Every attempt still writes its ownllm_usagerow. A 429, a timeout and a too-large request behave as before.Worst case adds about 3.5s to a call that ends up on OpenRouter anyway.
🤖 Generated with Claude Code