Support document attachments on user messages #594
Closed
fabian-hiller
started this conversation in
Feature Request
Replies: 1 comment
|
This has been implemented and will be available in 2.2. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
RFC
Summary
Allow user messages to carry document attachments such as PDFs, so the model receives them as native document content instead of extracted text or rasterized page images.
Background & Motivation
Currently an attachment can only be an image.
DeliveredAttachmentisPromptImage & { filename?: string }, and the runtime types say so directly: "Today the only supported attachment is an image." Tool results cannot close the gap either, sinceToolRunReturnis a string or a JSON-serializable envelope, which is the same underlying limitation raised for images in #565.Anthropic's Messages API accepts PDFs as
documentcontent blocks with no beta header, up to 32MB and 600 pages, and the model receives both the extracted text and a rendered image of every page. Would you consider supporting this in Flue?The two workarounds available today are both unsatisfying. Extracting the text server-side loses layout and returns nothing for a scan without a text layer. Rasterizing pages to images in the browser keeps the visuals, but costs roughly 5k tokens per page and writes every page into durable session history, which is the memory pressure already described in #529, #530 and #531.
Goals
Example
The delivered attachment becomes a union, and the operation options gain a
documentsfield mirroringimages:All reactions