plugin tool parameters files required is false , but when run the tool without files, throw error .upload_files not found in user inputs. #13668

Closed
opened 2026-02-21 19:13:15 -05:00 by yindo · 1 comment
Owner

Originally created by @heavi715 on GitHub (May 7, 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.3.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

plugin tool parameters type files required is false , but when run the tool without files, throw error .upload_files not found in user inputs.

{
"code": "invalid_param",
"message": "Variable key 1746603781611.upload_files not found in user inputs.",
"status": 400
}

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @heavi715 on GitHub (May 7, 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.3.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce plugin tool parameters type files required is false , but when run the tool without files, throw error .upload_files not found in user inputs. { "code": "invalid_param", "message": "Variable key 1746603781611.upload_files not found in user inputs.", "status": 400 } ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:13:15 -05:00
yindo closed this issue 2026-02-21 19:13:15 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 7, 2025):

There is a known issue related to handling optional file inputs in Dify plugins. When the 'required' parameter for file inputs is set to false, the expected behavior is that the file inputs are optional, and users should not be required to upload a file for the input to be valid [1]. However, there was a problem where the frontend sent an empty string ('') instead of an empty array ([]) for optional file list fields with no uploads, which was addressed in pull request #17861 [2].

The error message you're encountering, "Variable key 1746603781611.upload_files not found in user inputs," suggests that the system is still expecting a file input even though it should be optional. This might be related to the issue mentioned above, where the handling of optional file inputs was not correctly implemented.

You might want to check if the changes from pull request #17861 have been applied to your setup, as they were intended to fix this specific issue. If the problem persists, it could be beneficial to review the implementation of optional file inputs in your plugin configuration to ensure it aligns with the latest updates in Dify version 1.3.0.

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 (May 7, 2025): <!-- Answer --> There is a known issue related to handling optional file inputs in Dify plugins. When the 'required' parameter for file inputs is set to false, the expected behavior is that the file inputs are optional, and users should not be required to upload a file for the input to be valid <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/plugins/plugin-detail-panel/app-selector/app-inputs-panel.tsx)</sup>. However, there was a problem where the frontend sent an empty string ('') instead of an empty array ([]) for optional file list fields with no uploads, which was addressed in pull request #17861 <sup>[[2]](https://github.com/langgenius/dify/issues/18111)</sup>. The error message you're encountering, "Variable key 1746603781611.upload_files not found in user inputs," suggests that the system is still expecting a file input even though it should be optional. This might be related to the issue mentioned above, where the handling of optional file inputs was not correctly implemented. You might want to check if the changes from pull request #17861 have been applied to your setup, as they were intended to fix this specific issue. If the problem persists, it could be beneficial to review the implementation of optional file inputs in your plugin configuration to ensure it aligns with the latest updates in Dify version 1.3.0. <!-- 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/9bcf2082-5ba9-45b9-bd09-87bd2ce9b7a3?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/9bcf2082-5ba9-45b9-bd09-87bd2ce9b7a3?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/9bcf2082-5ba9-45b9-bd09-87bd2ce9b7a3?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/9bcf2082-5ba9-45b9-bd09-87bd2ce9b7a3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9bcf2082-5ba9-45b9-bd09-87bd2ce9b7a3?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/9bcf2082-5ba9-45b9-bd09-87bd2ce9b7a3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9bcf2082-5ba9-45b9-bd09-87bd2ce9b7a3?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#13668