Files
free-claude-code/core
Ali Khokhar e2fa4b66d9 Extract shared stream recovery session for provider transports (#835)
## Summary

- Add `StreamRecoverySession` in
`core/anthropic/stream_recovery_session.py` to centralize early-retry
classification, holdback buffering, retry counting, and flush/discard
behavior shared by Anthropic and OpenAI transports.
- Refactor `AnthropicMessagesTransport` and `OpenAIChatTransport` to use
the shared session instead of duplicating recovery holdback and
early-retry logic.
- Update architecture docs and tests for per-delta overlap trim on
midstream recovery; bump version to 2.2.1.

## Test plan

- [x] `uv run pytest tests/core/anthropic/test_stream_recovery.py`
- [x] `uv run pytest tests/providers/test_anthropic_messages.py
tests/providers/test_streaming_errors.py`
2026-06-16 22:01:53 -07:00
..