mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
* 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 |
||
|---|---|---|
| .. | ||
| controllers | ||
| middleware | ||
| routes | ||
| services | ||
| utils | ||
| cleanup.js | ||
| csp.spec.js | ||
| experimental.js | ||
| experimental.spec.js | ||
| index.js | ||
| index.metrics.spec.js | ||
| index.spec.js | ||
| socialLogins.js | ||
| socialLogins.spec.js | ||
| telemetry.js | ||
| telemetry.spec.js | ||