-
Notifications
You must be signed in to change notification settings - Fork 32
Retry request timeouts and rate limits (408/429) #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wassname
wants to merge
6
commits into
OpenRouterTeam:main
Choose a base branch
from
wassname:fix/chat-transient-retries
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bae00aa
Retry transient OpenRouter errors
wassname ef31bc8
Potential fix for pull request finding
wassname 12ce0d4
Genignore utils/retries.py so speakeasy generate keeps the retry changes
wassname d159a17
Merge remote-tracking branch 'upstream/main' into fix/chat-transient-…
31e1fba
Retry 408/429 via x-speakeasy-retries overlay instead of editing gene…
4e39d32
Add the retry overlay file and register it in workflow.yaml
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
.speakeasy/overlays/retry-transient-status-codes.overlay.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| overlay: 1.0.0 | ||
| x-speakeasy-jsonpath: rfc9535 | ||
| info: | ||
| title: Retry request-timeout and rate-limit responses | ||
| version: 0.0.0 | ||
| actions: | ||
| - target: $["x-speakeasy-retries"].statusCodes | ||
| description: Also retry 408 (request timeout) and 429 (rate limit), not just 5XX | ||
| update: | ||
| - "408" | ||
| - "429" | ||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[suggestion] No CI step regenerates the spec or applies this overlay to confirm the update action appends 408/429 rather than replacing the existing
statusCodesarray.Details
Why: The PR description states
speakeasy overlay applywas run manually and producedstatusCodes: [5XX, 408, 429], but this repo's CI has no check that regenerates the spec from this workflow. If the overlay's array semantics ever behaved as a wholesale replace instead of an append (or a future Speakeasy version changed that behavior),5XXwould silently drop out of the retry config with no signal — every other overlay in this directory only ever sets a scalar or object field, so there's no existing regression test covering array-update semantics either.Fix: Add a lightweight CI step (or a local pytest-style check) that runs the overlay against the base spec and asserts the resulting
statusCodeslist contains5XX,408, and429— turning the author's one-time manual verification into a repeatable regression guard.Ref: OpenAPI Overlay Specification — array update semantics
Prompt for agents
Reviewed at
4e39d32There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, no CI covers it. Verified locally with
speakeasy overlay apply: statusCodes becomes [5XX, 408, 429] (append keeps 5XX). -- Claude