mirror of
https://github.com/Alishahryar1/free-claude-code.git
synced 2026-07-03 14:05:26 +02:00
e2fa4b66d9
## 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`