LibreChat/packages
Marco Beretta c5c01dffe3 🔌 refactor: Drive the Resumable Stream Through the ChatTransport (#16378)
* refactor: drive the resumable stream through the ChatTransport

Add reconnectToStream to ChatTransport and the sse.js transport: a GET
attach with request headers, a token refresh on every 401, a cancel the
caller did not issue reported as a dropped connection (status 0), and a
closed flag for the foreground check. useResumableSSE now consumes
normalized ChatEvents instead of opening sse.js and parsing frames
itself; resume, steer and queue bookkeeping are unchanged.

* fix: bound the resume 401 refresh and keep plain-text server errors

Refresh the token once per attachment and report a second 401, so the
hook's reconnect budget bounds a stream that keeps answering 401. A
server-written error event that is not JSON keeps its raw text instead
of reading as a dropped connection.

(cherry picked from commit df01dba657)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16378
2026-10-01 03:46:17 +00:00
..
api 🛶 test: Isolate Marketplace Retries and MCP OAuth Ownership 2026-10-01 03:46:17 +00:00
client 🔲 a11y: Form-Control Outlines Clear 3:1 in Every Palette (#16377) 2026-10-01 03:46:17 +00:00
data-provider 🔌 refactor: Drive the Resumable Stream Through the ChatTransport (#16378) 2026-10-01 03:46:17 +00:00
data-schemas ⚙️ feat: Make the Per-User Passkey Cap Configurable (#16259) 2026-10-01 03:46:17 +00:00