llama.cpp b9864 introduces 1s SSE pings to keep connections alive
No more dropped connections during slow AI prefill with llama.cpp's SSE fix
llama.cpp, the popular open-source C++ implementation of LLaMA models, released version b9864 with a targeted fix for server-side streaming reliability. The change centers on Server-Sent Events (SSE) connections: during slow prefill phases—where the model takes time to start generating tokens—the previous behavior could drop healthy connections because a selected ping interval was too coarse. The new release introduces a `sse_ping_interval` field that becomes a per-request body parameter, allowing WebUIs and API clients to declare exactly how often they need a keepalive. The global CLI default remains 30 seconds to avoid breaking existing integrations, but the built-in WebUI now requests a 1-second ping interval and will only disconnect after 3 seconds of no response. This ensures that long computation times during prefill don't trigger premature disconnections, which has been a pain point for developers running llama.cpp as a backend.
The fix also includes hard limits on the parameter (-1 to INT32_MAX) via the request schema, with type and range validation enforced at parse time. The release ships prebuilt binaries for macOS (Apple Silicon arm64 with optional KleidiAI, Intel x64), Linux (x64, arm64, s390x; Vulkan, ROCm 7.2, OpenVINO, SYCL), Windows (x64 CPU/ARM64; CUDA 12/13, Vulkan, OpenCL Adreno, SYCL, HIP), Android arm64, and iOS XCFramework. This release is signed and verified.
- New `sse_ping_interval` per-request body field allows clients to customize SSE keepalive cadence.
- Global default stays 30s for backward compatibility; WebUI sends 1s pings with a 3s kick timeout.
- Prevents premature disconnection of healthy streams during slow model prefill phases.
Why It Matters
Self-hosted AI users get more reliable streaming inference without dropped connections during long prefill.