Describe the bug
When trying to attach non-image files such as PDFs, the API rejects the chat request saying the file type is not supported.
Steps to reproduce
- Run
any p "summarize this file" -a ./file/to/pdf.pdf
- See logs for error output
Expected behavior
The server accepts the attachment and includes it as context before the prompt.
Actual behavior
Aborts the stream with 400 Invalid 'input[31].content[1].image_url'. Expected a base64-encoded data URL with an image MIME type (e.g. 'data:
image/png;base64,aW1nIGJ5dGVzIGhlcmU='), but got unsupported MIME type 'application/pdf'.
Describe the bug
When trying to attach non-image files such as PDFs, the API rejects the chat request saying the file type is not supported.
Steps to reproduce
any p "summarize this file" -a ./file/to/pdf.pdfExpected behavior
The server accepts the attachment and includes it as context before the prompt.
Actual behavior
Aborts the stream with 400 Invalid 'input[31].content[1].image_url'. Expected a base64-encoded data URL with an image MIME type (e.g. 'data:
image/png;base64,aW1nIGJ5dGVzIGhlcmU='), but got unsupported MIME type 'application/pdf'.