Skip to content

fix: retry overloaded OpenAI stream errors#25732

Closed
marcusquinn wants to merge 1 commit intoanomalyco:devfrom
marcusquinn:fix/retry-overloaded-stream-errors
Closed

fix: retry overloaded OpenAI stream errors#25732
marcusquinn wants to merge 1 commit intoanomalyco:devfrom
marcusquinn:fix/retry-overloaded-stream-errors

Conversation

@marcusquinn
Copy link
Copy Markdown

Summary

  • Classify OpenAI service_unavailable_error / server_is_overloaded stream chunks as retryable API errors.
  • Add regression coverage for the overloaded Responses SSE error shape so sessions use the existing retry path instead of surfacing a terminal error.

Fixes #25731

Verification

  • git diff --check -- packages/opencode/src/provider/error.ts packages/opencode/test/session/retry.test.ts
  • bun test test/session/retry.test.ts from packages/opencode was attempted but blocked in this worktree by missing preload dependency: @opentui/solid/preload.

aidevops.sh v3.14.42 plugin for OpenCode v1.14.33 with gpt-5.5 spent 1h 2m and 681,876 tokens on this with the user in an interactive session.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label May 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

The following comment was made by an LLM, it may be inaccurate:

I found a related PR that should be checked:

fix(session): retry Codex server_is_overloaded stream errors (PR #25728)

This PR addresses a very similar issue - handling server_is_overloaded stream errors as retryable, but for Codex. Since PR #25732 is doing the same thing for OpenAI, these two PRs should be reviewed together to ensure consistent error handling patterns across providers.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 4, 2026
@github-actions github-actions Bot closed this May 4, 2026
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.

Retry OpenAI overloaded stream errors

1 participant