Skip to content

Document FILE_UPLOAD_SSE_ENABLED - Use SSE to upload files#696

Open
MarcAmick wants to merge 1 commit into
LibreChat-AI:mainfrom
MarcAmick:docs/use-sse-during-file-upload-to-keep-connection-alive
Open

Document FILE_UPLOAD_SSE_ENABLED - Use SSE to upload files#696
MarcAmick wants to merge 1 commit into
LibreChat-AI:mainfrom
MarcAmick:docs/use-sse-during-file-upload-to-keep-connection-alive

Conversation

@MarcAmick

Copy link
Copy Markdown
Contributor

This change documents a new FILE_UPLOAD_SSE_ENABLED property utilized by librechat pull request 14295 but also moves CONVERSATION_IMPORT_MAX_FILE_SIZE_BYTES and FILE_PREVIEW_MAX_EXTRACT_BYTES documentation to the "other" section and out of "analytics" since they both have nothing to do with analytics.

Use SSE to upload files in order to avoid idle timeouts. Idle timeouts can occur for example from gateways and other services like Cloudflare when uploading large files. For example during rag processing the file is uploaded to librechat which then sends it to rag. While librechat is waiting for the embeddings to come back from rag the file upload is sitting idle. Gateways tend to want to cancel the upload with an http 408, 504, or 524. This change uses SSE to perform the upload so that while librechat is sending the file to rag, it consistently sends back a heartbeat event to the client to keep the connection alive. This is especially useful when utilizing EMBEDDING_BATCH_SIZE in librechat rag which will allow rag to process significantly larger files without running out of memory.

…o avoid idle timeouts. Idle timeouts can occur for example from gateways and other services like cloudfare when uploading large files. For example during rag processing the file is uploaded to librechat which then sends it to rag. While librechat is waiting for the embeddings to come back from rag the file upload is sitting idle. Gateways tend to want to cancel the upload with an http 408, 504, or 524. This change uses SSE to perform the upload so that while librechat is sending the file to rag, it consistently sends back a heartbeat event to the client to keep the connection alive. This is especially useful when utilizing EMBEDDING_BATCH_SIZE in librechat rag which will allow rag to process signifigantly larger files without running out of memory.
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the LibreChat's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant