LibreChat/e2e/setup
Marco Beretta 698ee25fea
🧯 fix: Close Abandoned Download and Speech Streams and Cap Speech Input (#17270)
* fix: Contain Download and Speech Stream Failures and Cap Speech Input

The code output download piped the Code API stream with .pipe, which adds no
error listener, so a body that failed mid-stream (a bad gzip body, a reset)
became an uncaught exception and the process exited. pipeToResponse uses
stream.pipeline, ending the response and destroying the upstream when the
client leaves.

Text-to-speech piped provider streams the same way and waited only for
'end', so a provider error was uncaught and a client disconnect left the
chunk loop waiting. pipeSegment resolves on end and rejects on an error or
a disconnect, which ends the loop.

A speech request had no length cap, so one request could fan out into
thousands of serial paid provider calls. speech.tts.maxInputChars bounds it
(default 20,000 characters).

* docs: Document the Speech Input Cap in the Example Config

* fix: Reject a Speech Segment When the Client Already Left

* fix: Tear Down Both Ends of a Failed Speech Segment and Cap Streamed Speech

A failed provider segment now destroys the response as well as the source,
so a half-written answer cannot hang the client, and a response-side error
rejects the segment instead of going unhandled. Automatic playback reads a
message only up to speech.tts.maxInputChars, so long messages cannot fan
out past the cap either.

The download scenario now checks the behavior .pipe lacked: leaving a code
download closes the upstream connection right away.

* fix: Keep a Late Response Write Error From Going Unhandled

* test: Key Slow Code Downloads by File and Send a Browser User Agent

* fix: Read Speech Up to the Cap Instead of Refusing It

Manual speech now synthesizes the text up to speech.tts.maxInputChars, the
same as automatic playback, through capSpeechInput, so the CJS service only
passes the capped text along and the request keeps its existing error
contract. A streamed message that reaches the cap exactly now finishes, and
a segment that fails before any audio went out leaves the response open for
the caller's HTTP error.

* fix: Count Only Text Against the Speech Cap
2026-10-19 22:20:40 +02:00
..
agent-management.ts 🛅 fix: Preserve Agent Management Upload IDs (#15840) 2026-09-14 15:24:47 -04:00
authenticate.ts ⌨️ feat: Change Default Chat Preferences (#16932) 2026-10-12 00:55:36 +02:00
cleanupUser.ts 📧 feat: add email address change (#14597) 2026-10-01 03:46:16 +00:00
dynamic-mcp-tools.js 📡 fix: Refresh MCP Tools After List-Changed Notifications (#14686) 2026-08-08 13:50:21 -04:00
env.ts 🖲️ fix: Enable Running Chat Menus and Preserve Renamed Titles (#16697) 2026-10-03 23:17:15 -04:00
fake-assistants-server.js 🛂 feat: Filter Model-Bound Content by Source (#14425) 2026-08-21 22:43:32 -04:00
fake-code-server.js 🧯 fix: Close Abandoned Download and Speech Streams and Cap Speech Input (#17270) 2026-10-19 22:20:40 +02:00
fake-git-host-server.js 🪣 feat: Look Up Bitbucket Cloud Pull Requests (#16987) 2026-10-12 07:34:51 +02:00
fake-label-server.js 🖲️ fix: Enable Running Chat Menus and Preserve Renamed Titles (#16697) 2026-10-03 23:17:15 -04:00
fake-mcp-app-server.mjs 🐛 fix: Restore MCP App Rendering and Actions (#16382) 2026-10-16 13:27:29 -07:00
fake-mcp-dynamic-network-server.js 📡 fix: Refresh MCP Tools After List-Changed Notifications (#14686) 2026-08-08 13:50:21 -04:00
fake-mcp-http-server.js 🔐 fix: Honor Admin-Panel MCP Allowlist Overrides Without Restart (#13814) 2026-06-17 20:14:53 -04:00
fake-mcp-oauth-server.js 🪢 test: Prove MCP OAuth Resume End to End (#15485) 2026-09-01 18:38:39 -04:00
fake-mcp-server.js 🔐 fix: Encrypt User Plugin Credentials With Random-IV v3 Format (#16996) 2026-10-12 16:33:08 +02:00
fake-model.js 💠 feat: Add Gemini 4 Argon Support (#17200) 2026-10-17 21:44:44 +02:00
fake-rag-server.js 🧬 fix: Skip Re-Embedding Legacy File Search Files After Upgrade (#17206) 2026-10-17 19:19:14 +02:00
global-setup.email.ts 📧 feat: add email address change (#14597) 2026-10-01 03:46:16 +00:00
global-setup.local.ts
global-setup.ts
global-teardown.email.ts 📧 feat: add email address change (#14597) 2026-10-01 03:46:16 +00:00
global-teardown.local.ts
global-teardown.mock.ts 🎭 feat: Add Credential-Free Playwright Smoke Suite with a Local Mock LLM (#13472) 2026-06-02 16:36:39 -04:00
global-teardown.ts
mailbox-server.js 📧 feat: add email address change (#14597) 2026-10-01 03:46:16 +00:00
mailbox.ts 📧 feat: add email address change (#14597) 2026-10-01 03:46:16 +00:00
model-replay.js 🎬 test: Record-Once/Replay-Forever Model Fixtures for Mock E2E (#15210) 2026-08-25 18:29:55 -04:00
record-model.js 🎬 test: Record-Once/Replay-Forever Model Fixtures for Mock E2E (#15210) 2026-08-25 18:29:55 -04:00
record.js ⌨️ feat: Change Default Chat Preferences (#16932) 2026-10-12 00:55:36 +02:00
run-files-lifecycle-model.js 🦘 feat: Share Run-Scoped Files With Subagents (#15848) 2026-09-12 20:14:22 -04:00
run-files-model.js 🦘 feat: Share Run-Scoped Files With Subagents (#15848) 2026-09-12 20:14:22 -04:00
runtimeEnv.ts
start-server-cluster.js 📡 fix: Refresh MCP Tools After List-Changed Notifications (#14686) 2026-08-08 13:50:21 -04:00
start-server.js 🧪 test: Run mock E2E against Redis in shards (#14551) 2026-07-31 12:10:43 -04:00
tool-approval-hook.js 🛂 test: Cover Tool Approval Workflows End to End (#14427) 2026-07-26 21:58:25 -04:00
user.ts
users.email.ts 📧 feat: add email address change (#14597) 2026-10-01 03:46:16 +00:00
users.mock.ts 🎭 feat: Add Credential-Free Playwright Smoke Suite with a Local Mock LLM (#13472) 2026-06-02 16:36:39 -04:00