fix(providers): classify transport errors as retriable for fallback chain#1465
Closed
darrenzeng2025 wants to merge 1 commit intosipeed:mainfrom
Closed
fix(providers): classify transport errors as retriable for fallback chain#1465darrenzeng2025 wants to merge 1 commit intosipeed:mainfrom
darrenzeng2025 wants to merge 1 commit intosipeed:mainfrom
Conversation
…hain Add transport-level connection error patterns to error classifier: - connection reset by peer - connection refused - no route to host - unexpected eof - broken pipe - network is unreachable - connection closed - tls handshake errors - read/write tcp errors These errors are now classified as FailoverTimeout (retriable), allowing the fallback chain to continue instead of aborting on unclassified errors. Fixes sipeed#1419 (part 1)
xuwei-xy
pushed a commit
to xuwei-xy/picoclaw
that referenced
this pull request
Mar 14, 2026
|
@darrenzeng2025 Hi! This PR has had no activity for over 2 weeks, so I'm closing it for now to keep things tidy. If it's still relevant, feel free to reopen it anytime and we'll pick it back up. |
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.
Description
Fixes fallback chain aborting on retriable OpenRouter transport resets and similar transport-level errors.
Changes
Added transport-level connection error patterns to error classifier:
These errors are now classified as
FailoverTimeout(retriable), allowing the fallback chain to continue to the next candidate instead of aborting with "unclassified error".Type of Change
AI Code Generation
🤖 Fully AI-generated - AI wrote the code; contributor reviewed and validated it
Related Issue
Fixes #1419 (part 1 - transport error classification)
Technical Context
The issue was that
ClassifyError()did not recognize common transport failures like "connection reset by peer" as retriable, causing the fallback chain to abort prematurely with:Now these errors are classified as
FailoverTimeout, which is retriable, allowing fallback to continue.Test Environment
Checklist