Retry 408/429 via x-speakeasy-retries overlay instead of editing generated code

Reverts the hand-edits to the generated utils/retries.py, its .genignore entry, and
the test. Adds an overlay so 408/429 join 5XX in the retry config, regenerating cleanly
per CONTRIBUTING (generated code is not edited directly). Verified with
`speakeasy overlay apply`: statusCodes -> [5XX, 408, 429].

The 400-with-transient-inner-error.code case is not portable to the SDK (status-only
retry config, hooks run outside the retry loop) and is handled client-side instead.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-07-05 09:14:18 +08:00
co-authored by Claudypoo
parent d159a17d88
commit 31e1fbac0c
3 changed files with 27 additions and 158 deletions
-4
View File
@@ -1,7 +1,3 @@
pylintrc
docs/docs.json
docs/overview.mdx
# Owns retry response classification (408/429/5XX + transient inner error.code on 400s).
# Speakeasy has no overlay/hook surface for the 400-inner-code case, so this file is
# hand-maintained; genignore stops `speakeasy generate` from overwriting it. -- Claude
src/openrouter/utils/retries.py