Skip to content

fix(session): retry OpenAI overload stream errors - #2084

Open
yibudak wants to merge 1 commit into
XiaomiMiMo:mainfrom
yibudak:fix/openai-overload-stream-retry
Open

fix(session): retry OpenAI overload stream errors#2084
yibudak wants to merge 1 commit into
XiaomiMiMo:mainfrom
yibudak:fix/openai-overload-stream-retry

Conversation

@yibudak

@yibudak yibudak commented Aug 10, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #2083

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

OpenAI Responses can report transient capacity failures as service_unavailable_error / server_is_overloaded stream events. Classify those events as retryable so they enter MiMoCode's existing retry policy instead of terminating the session with the raw provider event.

Adds parser-level and end-to-end retry regression coverage using the observed event shape.

How did you verify your code works?

  • Focused provider/session retry tests: 65 passed
  • All four CI unit-test shards passed with Bun 1.3.14
  • bun lint: 0 errors
  • Full repository typecheck: passed

Shard 1 initially hit an unrelated workflow timing flake; the test passed in isolation and the full shard passed on rerun.

Screenshots / recordings

Not applicable; no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@yibudak

yibudak commented Aug 10, 2026

Copy link
Copy Markdown
Author

@yanyihan-xiaomi could you review please?

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.

OpenAI server_is_overloaded stream events are not retried

1 participant