Skip to content

[upstream #14701] #14701: Enforce the local parser size limit before uploading a Context document #252

Open

Description

@berry-13

Upstream PR: LibreChat-AI#14701, finding LibreChat-AI#14701 (comment)

When Context is routed through the local parser and fileConfig.documentParser.fileSizeLimit (default 15 MB) is below the endpoint upload limit, the client admits the file and uploads all of it before the server refuses with 413 PARSER_INPUT_LIMIT. The refusal is correct and shown to the user; the cost is the wasted upload.

Suggested fix: in client/src/utils/files.ts validation, apply the parser ceiling when the selected route is the local parser (not when a configured OCR or RAG text route will take the file), keeping the endpoint limit for those routes.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: clientreviewctl followups stateblocked: root openreviewctl followups stateperfreviewctl followups state

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions