When workflow uploads a picture and visually recognizes it through mass spectrometry glm-4v-flash, the parameter error is prompted. #199

Closed
opened 2026-02-16 10:18:25 -05:00 by yindo · 1 comment
Owner

Originally created by @5lei on GitHub (Apr 16, 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

Configure workflow, start the node to select the image to upload, and the second node uses glm-4v-flash for image recognition.

✔️ Expected Behavior

Hope to be able to recognize normally

Actual Behavior

An error is actually reported, and the error message is reported,
error message:[zhipuai] Error: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for ModelInvokeLLMRequest\nprompt_messages.content.type\n Input should be \u003cPromptMessageContentType.IMAGE: 'image'\u003e [type=literal_error, input_value='image', input_type=str]\n For further information visit https://errors.pydantic.dev/2.8/v/literal_error"}

Originally created by @5lei on GitHub (Apr 16, 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 Configure workflow, start the node to select the image to upload, and the second node uses glm-4v-flash for image recognition. ### ✔️ Expected Behavior Hope to be able to recognize normally ### ❌ Actual Behavior An error is actually reported, and the error message is reported, error message:[zhipuai] Error: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for ModelInvokeLLMRequest\nprompt_messages.content.type\n Input should be \u003cPromptMessageContentType.IMAGE: 'image'\u003e [type=literal_error, input_value='image', input_type=str]\n For further information visit https://errors.pydantic.dev/2.8/v/literal_error"}
yindo closed this issue 2026-02-16 10:18:25 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 16, 2025):

To resolve the PluginInvokeError related to the validation error for ModelInvokeLLMRequest when using glm-4v-flash for image recognition in a self-hosted Dify version 1.2.0 workflow, you should:

  1. Ensure you are using the Volcano (火山方舟) model version 0.0.10 or higher, as this version is confirmed to work with Dify v1.2.0.
  2. Move all prompts from the 'system' role to the 'user' role, as Zhipu does not support system role messages. This solution applies to the zhipuai SDK version 0.0.7.
  3. Upgrade your plugins to the following minimum versions to address validation errors related to type checking issues with multimodal prompt messages:
    • Azure OpenAI version 0.0.11 or higher
    • OpenAI version 0.0.14 or higher
    • OpenRouter version 0.0.6 or higher

If the issue persists with other models, you may need to report a separate issue for a model-specific fix [1][2][3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 16, 2025): <!-- Answer --> To resolve the PluginInvokeError related to the validation error for `ModelInvokeLLMRequest` when using `glm-4v-flash` for image recognition in a self-hosted Dify version 1.2.0 workflow, you should: 1. Ensure you are using the Volcano (火山方舟) model version 0.0.10 or higher, as this version is confirmed to work with Dify v1.2.0. 2. Move all prompts from the 'system' role to the 'user' role, as Zhipu does not support system role messages. This solution applies to the zhipuai SDK version 0.0.7. 3. Upgrade your plugins to the following minimum versions to address validation errors related to type checking issues with multimodal prompt messages: - Azure OpenAI version 0.0.11 or higher - OpenAI version 0.0.14 or higher - OpenRouter version 0.0.6 or higher If the issue persists with other models, you may need to report a separate issue for a model-specific fix <sup>[[1]](https://github.com/langgenius/dify/issues/17745)</sup><sup>[[2]](https://github.com/langgenius/dify/issues/17335)</sup><sup>[[3]](https://github.com/langgenius/dify/issues/16353)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/b7f93d4b-78ce-42d3-ab49-2c898c90fe43?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/b7f93d4b-78ce-42d3-ab49-2c898c90fe43?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/b7f93d4b-78ce-42d3-ab49-2c898c90fe43?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/b7f93d4b-78ce-42d3-ab49-2c898c90fe43?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b7f93d4b-78ce-42d3-ab49-2c898c90fe43?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/b7f93d4b-78ce-42d3-ab49-2c898c90fe43?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b7f93d4b-78ce-42d3-ab49-2c898c90fe43?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#199