My Dify encountered an error when calling the Tongyi LLM plugin. Run failed: [tongyi] Error: PluginInvokeError: {"args":{"description":"[models] Error: 'ImagePromptMessageContent' object has no attribute 'startswith'"},"error_type":"InvokeError","mes… #217

Closed
opened 2026-02-16 10:18:29 -05:00 by yindo · 7 comments
Owner

Originally created by @fightThrough on GitHub (Apr 22, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

Image

✔️ Expected Behavior

Who has encountered similar issues? How were they resolved?

Actual Behavior

No response

Originally created by @fightThrough on GitHub (Apr 22, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/33968791-8b35-44c9-92e3-eed52b18d7ef) ![Image](https://github.com/user-attachments/assets/012bb734-5951-494c-96b4-224b4f658d8f) ### ✔️ Expected Behavior Who has encountered similar issues? How were they resolved? ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:18:29 -05:00
Author
Owner

@fightThrough commented on GitHub (Apr 22, 2025):

The specific error is as follows:
Run failed: [tongyi] Error: PluginInvokeError: {"args":{"description":"[models] Error: 'ImagePromptMessageContent' object has no attribute 'startswith'"},"error_type":"InvokeError","message":"[models] Error: 'ImagePromptMessageContent' object has no attribute 'startswith'"}

@fightThrough commented on GitHub (Apr 22, 2025): The specific error is as follows: Run failed: [tongyi] Error: PluginInvokeError: {"args":{"description":"[models] Error: 'ImagePromptMessageContent' object has no attribute 'startswith'"},"error_type":"InvokeError","message":"[models] Error: 'ImagePromptMessageContent' object has no attribute 'startswith'"}
Author
Owner

@fightThrough commented on GitHub (Apr 22, 2025):

Is it an issue on Dify's side? I have tried different versions of the Tongyi Qianwen plugin, but they all reported the same error.

@fightThrough commented on GitHub (Apr 22, 2025): Is it an issue on Dify's side? I have tried different versions of the Tongyi Qianwen plugin, but they all reported the same error.
Author
Owner

@eric0032 commented on GitHub (Jun 19, 2025):

Hi, I am experiencing the same issue. Have you found a solution to it?

@eric0032 commented on GitHub (Jun 19, 2025): Hi, I am experiencing the same issue. Have you found a solution to it?
Author
Owner

@mideer2023 commented on GitHub (Jun 22, 2025):

解决了吗?我也遇到这个问题

@mideer2023 commented on GitHub (Jun 22, 2025): 解决了吗?我也遇到这个问题
Author
Owner

@Barney666 commented on GitHub (Jul 7, 2025):

My error like this: InvokeError","message":"[models] Error: 'description'
I tried to modify the agent strategy from funcation calling to react. This problem no longer occurs. So weird‌.

@Barney666 commented on GitHub (Jul 7, 2025): My error like this: `InvokeError","message":"[models] Error: 'description'` I tried to modify the agent strategy from funcation calling to react. This problem no longer occurs. So weird‌.
Author
Owner

@hanwenlin commented on GitHub (Aug 7, 2025):

Image the file can not be a parameter in the system. delete the {x}pictures

@hanwenlin commented on GitHub (Aug 7, 2025): <img width="347" height="73" alt="Image" src="https://github.com/user-attachments/assets/f957babf-0378-448a-a45b-811401e5c6d3" /> the file can not be a parameter in the system. delete the {x}pictures
Author
Owner

@dosubot[bot] commented on GitHub (Aug 24, 2025):

Hi, @fightThrough. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported an AttributeError in Dify v1.2.0 with the Tongyi LLM plugin related to 'ImagePromptMessageContent' missing the 'startswith' attribute.
  • Other users confirmed experiencing the same error and sought solutions.
  • A workaround was found by changing the agent strategy from function calling to react.
  • It was also suggested to avoid using image references in the system prompt as files cannot be parameters there.
  • These steps resolved the issue for affected users.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here.
  • Otherwise, I will automatically close this issue in 5 days.

Thanks for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 24, 2025): Hi, @fightThrough. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported an AttributeError in Dify v1.2.0 with the Tongyi LLM plugin related to 'ImagePromptMessageContent' missing the 'startswith' attribute. - Other users confirmed experiencing the same error and sought solutions. - A workaround was found by changing the agent strategy from function calling to react. - It was also suggested to avoid using image references in the system prompt as files cannot be parameters there. - These steps resolved the issue for affected users. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here. - Otherwise, I will automatically close this issue in 5 days. Thanks for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#217