mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
bedrock claude LLM plugin report error when upload a file as input #931
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nadazero on GitHub (Jan 14, 2026).
Self Checks
Dify version
1.10.1-fix1
Plugin version
0.0.58
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
and I upload the reproduce task yml file, you can run it and reproduce the issue.
测试claude模型上传附件bug.yml
✔️ Error log
No response
@nadazero commented on GitHub (Jan 14, 2026):
The problem seems to be treating the upload file as a string for "strip" processing
@dosubot[bot] commented on GitHub (Jan 14, 2026):
You're right—the error happens because the plugin tries to call
.strip()on the uploaded file input, which is actually a list (not a string) when passed via the Jinja template. The Bedrock Claude plugin expects system message content to be a string, but when a file is uploaded, it arrives as a list of content objects. Without type checking, calling.strip()on a list throws the'list' object has no attribute 'strip'error reference.To fix this, the plugin code should check if
message.contentis a list before calling.strip(). For example:As a workaround, you can also adjust your workflow or Jinja template to extract the file content as a string before passing it to the system prompt, so the plugin receives a string and not a list.
This pattern—checking for lists and extracting the first file or joining text—is used in other plugins to handle uploads safely reference. Making this change will prevent the error and allow file uploads to work as expected.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@crazywoola commented on GitHub (Feb 3, 2026):
Hi @nadazero, thanks for opening this issue.
Why this is being closed
Dify issue tracking requires English-only issue title and description for consistent collaboration.
Next steps
Please open a new issue in English and include clear details so maintainers can help efficiently.
Thanks for understanding and for your support.