Describe the problem/error/question
I just created a simple workflow consisting of a Chat Trigger and an AI Agent (just for testing). In the Chat Trigger, I enabled the toggle “Allow File Uploads”, and connected the node to the AI Agent node. See the screenshot:
In the Agent node, I specified “Source for Prompt” as “Connected Chat Trigger Node”, which pre-fills the value for “Prompt (User Message)” with “{{ $json.chatInput }}”.
Now something strange is going on: When I send a chat message together with an uploaded file and look at the json of the execution, I can see, that even though in the input JSON the “chatInput” is just a string, and the prompt is defined to just use that $json.chatInput, the image is passed to the prompt anyways, resulting in an error “Bad request - please check your parameters
400 JSON format issue: expected string at field messages.content got instead array”.
This is really unintuitive. Passing the image to the LLM should not happen automatically, if it is not specified in the user prompt field.
Question: Is this correct, or am I doing something wrong?
Please share your workflow
Information on your n8n setup
- n8n version: 1.88.0 (docker)
- Database (default: SQLite): PostreSQL

