Skip to content

Automatic reading policy for unified attachments #17370

Open

Description

@usnavy13

With unified uploads a user attaches a file once, but LibreChat still decides what happens to it from the file type alone. A spreadsheet is text-extracted at upload even when Run Code is enabled (#16618), a document the provider rejects for size is dropped from the turn before File Search or Run Code could take it, and the model is never told how an attachment was read.

Proposed scope: an opt-in fileConfig.llmDeliveryPolicy: automatic, settable globally, on endpoints.default or per endpoint. The default classic keeps today's routing. The policy engages only on turns where Run Code or File Search is loaded. On those turns spreadsheets go to Run Code without upload-time extraction, and other documents go to the provider within its limits, then to extracted text, then File Search, then Run Code. The model receives a short per-turn list of how each attachment can be read. There is no visual change apart from a preview fix for Office files.

The implementation is open as #16848, based on upstream dev. I opened it before claiming the work, which the contributing guide asks contributors not to do, so I have converted it to a draft. I would like to take this issue with agent assistance. The PR stays a draft until the feature is approved and this issue is assigned to me, and I will rework it to whatever scope is approved.

Related to #16618, #16560 and #15420, and to discussion #10941. Feature approval request: #17373.

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

    ✨ enhancementNew feature or request🗺️ File Storagecodegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions