Skip to content

v4.2.8 — retry transient network errors (not just HTTP status codes)#88

Merged
ZhiXiao-Lin merged 1 commit into
mainfrom
fix/network-retry
Jun 27, 2026
Merged

v4.2.8 — retry transient network errors (not just HTTP status codes)#88
ZhiXiao-Lin merged 1 commit into
mainfrom
fix/network-retry

Conversation

@ZhiXiao-Lin

Copy link
Copy Markdown
Contributor

The LLM retry path only retried HTTP statuses (429/500/502/503/529). A bare network error — timeout, connection reset, mid-flight drop, common on throttled endpoints like GLM — was classified Fatal and failed the turn with no retry.

Adds retry::is_transient_error and, in the streaming request path (anthropic + openai-compatible, which covers GLM), classifies transient network errors as Retryable (synthetic 503) so they back off + retry like Claude Code. Genuine errors (bad key, model-not-found, context-length) still bail immediately. Unit-tested; 34 retry tests pass. Bumps 4.2.8.

The retry path only retried HTTP statuses (429/5xx/529); a network error
(timeout, connection reset, mid-flight drop — common on throttled endpoints
like GLM) was classified Fatal and failed the turn outright. Add is_transient_error
and, in the streaming request path (anthropic + openai-compatible/GLM), classify
transient network errors as Retryable (synthetic 503) so they back off + retry
like Claude Code. Real errors (bad key, model not found) still bail. Bumps 4.2.8.
@ZhiXiao-Lin ZhiXiao-Lin merged commit bf29b6b into main Jun 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant