v3.8.3: Fix codebuff streaming — SSE events now reach Codex client

- Root cause: _handle_codebuff streaming loop collected events but never
  wrote them to self.wfile (stream_buffered_events was not called)
- Fix: Replaced manual loop with stream_buffered_events() + on_event callback
- Confirmed working: raw API streaming, non-stream, and stream through proxy
- Updated CHANGELOG.md, README.md, version labels to 3.8.3
This commit is contained in:
admin
2026-05-24 19:30:10 +04:00
Unverified
parent f9a83e4862
commit df9e9d1fa6
5 changed files with 282 additions and 54 deletions

View File

@@ -1,6 +1,28 @@
# Changelog
## v3.8.1 (2026-05-24)
## v3.8.3 (2026-05-24)
**Critical Fix — Codebuff Streaming Now Works End-to-End**
### Root Cause
The codebuff streaming handler collected SSE events into an internal list but **never wrote them to the client socket** (`self.wfile`). The `stream_buffered_events()` method — which handles buffered flushing (30ms interval / 4KB threshold / urgent events) — was not called for the codebuff streaming path. Codex CLI received zero bytes, showing "thinking..." indefinitely.
### Fix
Replaced the manual streaming loop in `_handle_codebuff()` with `self.stream_buffered_events()` using an `on_event` callback pattern, matching the architecture used by the gemini-oauth, anthropic, and command-code backends. Events now flow in real-time with proper buffered flushing.
### Changes
- **translate-proxy.py**: `_handle_codebuff()` streaming path rewritten — uses `stream_buffered_events()` with `_on_fb_event()` callback for metadata extraction
- Non-streaming path unchanged (already working)
- pycache cleanup in launcher ensures stale `.pyc` bytecode never loads old code
### Confirmed Working (API-level tests)
1. Raw codebuff API streaming: 36 SSE chunks, "hello" text received
2. Non-stream through proxy: complete JSON response with text
3. **Streaming through proxy: full SSE event sequence**`response.created``response.output_text.delta("hello")``response.completed`
---
## v3.8.2 (2026-05-24)
**Codebuff Integration — FREE DeepSeek V4 Pro Access + Provider Presets Restored**