Skip to content

[Bug]: CLI Doesn't Accept Attachments That Are Not Images #1

@angelplusultra

Description

@angelplusultra

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

  1. Run any p "summarize this file" -a ./file/to/pdf.pdf
  2. 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'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions