Skip to content

v1.6.2 — Long-Context Streaming Resilience, Idle Watchdogs & reasoning_content Compat

Choose a tag to compare

@ShawTim ShawTim released this 20 Nov 07:41
· 52 commits to main since this release

Highlights

  • SSE Keepalive Heartbeats: Emits periodic 15s SSE : keepalive\n\n comments on live streams (src/gateway/response-delivery.mjs, SharedResponse.writeKeepalive in src/gateway/request-resumption.mjs) without polluting replay buffers, preventing Node.js undici 300s bodyTimeout (TypeError: terminated) drops during long prefill/thinking turns.
  • Graceful Deadline Flush: Gives delivery.interrupt() a 2-second grace window on healthy sockets at REQUEST_DEADLINE (src/gateway/app.mjs) to flush finish_reason: "tool_calls" / "stop", incomplete: true, and data: [DONE] cleanly instead of resetting the TCP socket.
  • Post-Tool Hallucination Early-Stop: Immediately cancels upstream generation (turn.cancel()) when liveSplitter.suppressed detects a hallucinated [Caller tool result] after valid tool calls (src/tool-protocol.mjs, src/native-provider.mjs), shared across Gateway, pi-gemini-app@0.1.7, and openclaw-gemini-app@0.1.3.
  • Bounded Upstream Idle Watchdogs: Handles stalled Google Robin streams in src/native-provider.mjs without affecting prefill/thinking silence or < 2,048 B short replies:
    • postCompleteGraceMs (8s): finishes verified completed turns cleanly when upstream omits END_STREAM.
    • postToolIdleMs (15s): flushes committed tool_calls cleanly when upstream stalls after emitting tool calls.
    • postOutputIdleMs (45s): flushes committed >= 2,048 B text cleanly when upstream stalls mid-reply (never tripping short < 2,048 B prefix-gated replies into retry loops).
  • OpenClaw & Reasoning Client Compatibility: Accepts and strips optional reasoning_content / reasoning (string | null) fields on replayed assistant messages (src/openai-contract.mjs), fixing 400 UNSUPPORTED_PARAMETER: messages.reasoning_content.
  • Streamlined Bilingual READMEs: Focused README.md and README.zh.md for faster 30-second onboarding.

Packages & Docker

  • Gateway: gemini-app2api@1.6.2 · ghcr.io/shawtim/gemini-app2api:v1.6.2 (linux/amd64, linux/arm64)
  • Pi Extension: pi-gemini-app@0.1.7
  • OpenClaw Plugin: openclaw-gemini-app@0.1.3

Full Changelog: v1.6.1...v1.6.2