v3.8.3: Fix freebuff streaming — SSE events now reach Codex client
- Root cause: _handle_freebuff 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:
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1,6 +1,28 @@
|
||||
# Changelog
|
||||
|
||||
## v3.8.1 (2026-05-24)
|
||||
## v3.8.3 (2026-05-24)
|
||||
|
||||
**Critical Fix — Freebuff Streaming Now Works End-to-End**
|
||||
|
||||
### Root Cause
|
||||
The freebuff 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 freebuff streaming path. Codex CLI received zero bytes, showing "thinking..." indefinitely.
|
||||
|
||||
### Fix
|
||||
Replaced the manual streaming loop in `_handle_freebuff()` 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_freebuff()` 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 freebuff 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)
|
||||
|
||||
**Freebuff Integration — FREE DeepSeek V4 Pro Access + Provider Presets Restored**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user