Skip to content

v1.7.1 — Keepalive Headers, Idle Anchoring, HTTP/2 Watchdog & Large Image Upload Recovery

Choose a tag to compare

@ShawTim ShawTim released this 23 Nov 10:07
· 12 commits to main since this release

Highlights

Streaming & Timeout Reliability

  • 45s Comment-Only SSE Keepalive Headers (/v1/chat/completions): Flushes HTTP 200 text/event-stream + : keepalive heartbeats at 45s while buffering large slow tool_call blocks (20–35 KB), preventing 300s client/SDK header timeouts without committing output or breaking uncommitted retry safety.
  • Anchored Idle Timers (No Infinite Waits): Locks post_complete, post_tool, post_output, and post_tool_error deadlines to actual text/completion progress so repeated duplicate or metadata-only frames can never reset idle timers forever.
  • Smarter Tool-Block Idle Probing: Distinguishes tool_choice: 'required' preambles and still-streaming 2nd tool calls (TRUNCATED_TOOL_CALL) from closed invalid tool blocks, preventing premature cancellations while promptly closing stalled malformed tool calls.
  • HTTP/2 PING ACK Watchdog (30s): Detects unresponsive upstream HTTP/2 sessions cleanly with client.connecting guards, ERR_HTTP2_PING_CANCEL handling, and monotonic sequence tracking.

Large Image Upload Stability

  • Byte-Budget Upload Pacing (4 MiB In-Flight Cap): Keeps small images uploading in parallel while automatically pacing multi-megabyte PNG bursts (e.g., 4–7 × 2.9 MiB screenshots) so they no longer overwhelm a single HTTP/2 upload session.
  • Incremental Blob Caching & Sequential Reset Retry: Preserves completed uploads immediately in blobCache via onUploaded, retries remaining uncached images on fresh HTTP/2 sessions (concurrency: 1), and classifies NATIVE_IMAGE_UPLOAD_RESET for gateway-level transient failover.

Tool Protocol & Test Speed

  • Mid-Stream Tool Error Recovery: Defers mid-stream TOOL_ERRORS to validate with exact postFenceOffset tracking and a shared 1-retry tool_protocol cap.
  • Parallel Offline Product Suite: Runs the 75-file offline product suite in a bounded parallel worker pool (~4.6× faster).

Updated Extension Packages (npm)

  • pi-gemini-app@0.1.10
  • openclaw-gemini-app@0.1.6
  • mcp-gemini-app@0.1.1
  • opencode-gemini-app@0.1.1

Verification

  • Offline pre-release checks: 6/6 current-contract, 75/75 product tests, 71/71 Playwright browser E2E, 3/3 Python SDK smoke, 5/5 release package checks.
  • Live real-upstream verification: 4 × 2.9 MiB PNGs, 24-image (~24 MiB) batch, tool_choice: 'required', 28.9 KB slow tool call with 45s SSE keepalive flush, Gateway POST /mcp, mcp-gemini-app (gateway proxy & standalone direct stdio), and opencode-gemini-app on OpenCode 1.19.6.