Files
opencode/packages
Artur Do Lago b839e53c5c fix(fallback): handle mid-stream errors with automatic fallback
When providers like OpenAI return a stream successfully but error during
iteration (e.g., insufficient_quota mid-stream), the fallback system now
catches these errors and switches to a fallback provider.

Key changes:
- Add wrapFullStream() using Proxy to intercept async iteration
- Add tryMidStreamFallback() for mid-stream recovery
- Wrap all returned streams with the mid-stream error handler
- Emit FallbackUsed event with "mid-stream:" reason prefix

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 11:53:31 +01:00
..
2026-01-20 01:42:14 +00:00
2026-01-19 21:55:27 +00:00
2026-01-19 21:55:27 +00:00
2026-01-19 21:55:27 +00:00
2026-01-19 21:55:27 +00:00
2026-01-19 22:13:58 +00:00
2026-01-19 22:13:58 +00:00
2026-01-19 21:55:27 +00:00
2026-01-19 21:55:27 +00:00
2026-01-19 21:55:27 +00:00