Skip to content

v0.7.16 — Fix Stream Unexpected EOF & Clean Stream Closure

Choose a tag to compare

@neuralnexustech neuralnexustech released this 24 Sep 06:56
· 69 commits to main since this release

Fixes in v0.7.16

Fixed 'stream reading error: unexpected EOF'

  1. Connection Timeout Scoped to Headers Only:
    • Previously, \AbortSignal.timeout(30_000)\ was placed directly on upstream \ etch(). In Node.js, that signal stayed active across the entire streaming lifecycle and forcefully aborted active streams at 30 seconds.
    • Now, a 30s connection timeout is used strictly for receiving the initial response headers. Once headers arrive and streaming begins, the timer is cleared via \clearTimeout()\ in \ inally, allowing AI models to stream uninterrupted for minutes.
  2. Clean Anthropic SSE Stream Termination:
    • In \claude-translator.ts, if any network hiccup or provider interruption occurs, the stream pump now cleanly emits \content_block_stop, \message_delta\ (with stop_reason \end_turn), and \message_stop\ before closing the stream controller.
    • Anthropic clients (e.g. Claude Code CLI, Cursor, Cline) will never experience an unclosed block or truncated stream triggering \unexpected EOF.