Skip to content

fix: fall back on OpenAI streaming overloads - #2913

Merged
Mason Daugherty (mdrxy) merged 1 commit into
mainfrom
open-swe/streaming-overload-fallback
Sep 17, 2026
Merged

Mason Daugherty (mdrxy) merged 1 commit into
mainfrom
open-swe/streaming-overload-fallback

Conversation

@mdrxy

@mdrxy Mason Daugherty (mdrxy) commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

OpenAI Responses streaming overloads can raise a plain APIError without status_code, causing runs to fail before trying the configured fallback.

  • Retry only exact base-class instances (type(exc) is openai.APIError) when classify_exception(exc) == "provider_overloaded". This does not make every APIError retryable: unrelated plain APIErrors classified as provider_unavailable still propagate, and subclasses retain their existing handling.
  • Reuse the existing overload classifier, which recognizes overloaded in the message or extracted provider code. This supports the reported status-less streaming error without assuming an HTTP status or structured error code; it is a text-based classification, not a strict structured-code match.
  • Preserve retry timing, model selection, configuration, and exhaustion behavior. Behavioral coverage includes successful fallback for the exact overload message and propagation of unrelated API, authentication, invalid-request, and context-length errors.

Made by Open SWE · openai:gpt-6-astra (low)

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@mdrxy
Mason Daugherty (mdrxy) marked this pull request as ready for review September 17, 2026 17:24

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Open SWE Review: No issues found

Open SWE reviewed this PR and found no potential bugs to report.

Open in Web • View Open SWE trace

@mdrxy
Mason Daugherty (mdrxy) merged commit e20d667 into main Sep 17, 2026
25 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the open-swe/streaming-overload-fallback branch September 17, 2026 17:59
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.

2 participants