Files
openrouter-python-sdk-retry…/src/openrouter
wassnameandClaudypoo 1901a00e9e Retry HTTP 400s that wrap a transient upstream code in error.code
OpenRouter is a passthrough for providers it does not control, and some transient
provider failures (502/503/529/...) arrive as HTTP 400 with the real status in the
JSON error.code. Retry only those; ordinary 400 invalid-request responses (including
inner error.code == 400) stay non-retryable. Reuses the existing TemporaryError/backoff.

Note: this edits generated code because retry classification here is HTTP-status only
(x-speakeasy-retries) and SDK hooks run outside the retry loop, so a 400 body cannot be
inspected via an overlay or hook. Preserving it across regen needs a genignore or upstream
Speakeasy support -- flagging for maintainers.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-07-05 09:35:55 +08:00
..
2026-06-11 12:10:31 -04:00
2025-11-13 10:56:25 -05:00
2025-12-04 10:46:19 -05:00