Custom tool input parameter type change #11930

Closed
opened 2026-02-21 19:04:48 -05:00 by yindo · 9 comments
Owner

Originally created by @Wimeremce7 on GitHub (Mar 21, 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.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

In dify-0.15.3, I encapsulated a layer of file extraction through a workflow and published this workflow as a custom tool. Everything was normal, but now that I have updated dify to 1.0.1, this tool is no longer usable. I observed that the input type of this tool has changed from type=files to type=file list。

Image

This is the change I have observed:
V1.0.1:

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Wimeremce7 on GitHub (Mar 21, 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.0.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce In dify-0.15.3, I encapsulated a layer of file extraction through a workflow and published this workflow as a custom tool. Everything was normal, but now that I have updated dify to 1.0.1, this tool is no longer usable. I observed that the input type of this tool has changed from type=files to type=file list。 ![Image](https://github.com/user-attachments/assets/e3db53bf-fc44-44b1-b294-6347a8dd8ca0) This is the change I have observed: V1.0.1: ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🔨 feat:tools label 2026-02-21 19:04:48 -05:00
yindo closed this issue 2026-02-21 19:04:48 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 21, 2025):

I found a similar unsolved discussion that might be relevant to your issue: Help, Custom tool support file as param?, which was last updated on November 21, 2024 [1].

Unfortunately, there isn't specific documentation or release notes available that address changes to custom tool input parameters between Dify versions 0.15.3 and 1.0.1. However, there is a general migration guide for upgrading to version 1.0.0, which includes steps for migrating tools to plugins [2][3]. This might provide some insights or steps that could be relevant to your situation.

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 (Mar 21, 2025): <!-- Answer --> I found a similar unsolved discussion that might be relevant to your issue: [Help, Custom tool support file as param?](https://github.com/langgenius/dify/discussions/9322), which was last updated on November 21, 2024 <sup>[[1]](https://github.com/langgenius/dify/discussions/9322)</sup>. Unfortunately, there isn't specific documentation or release notes available that address changes to custom tool input parameters between Dify versions 0.15.3 and 1.0.1. However, there is a general migration guide for upgrading to version 1.0.0, which includes steps for migrating tools to plugins <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/development/migration/migrate-to-v1.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/development/migration/migrate-to-v1.md)</sup>. This might provide some insights or steps that could be relevant to your situation. <!-- 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/4935c281-28be-4e8f-9c69-5e79dad6cebd?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/4935c281-28be-4e8f-9c69-5e79dad6cebd?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/4935c281-28be-4e8f-9c69-5e79dad6cebd?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/4935c281-28be-4e8f-9c69-5e79dad6cebd?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4935c281-28be-4e8f-9c69-5e79dad6cebd?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/4935c281-28be-4e8f-9c69-5e79dad6cebd?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4935c281-28be-4e8f-9c69-5e79dad6cebd?feedback_type=other)</sup>
Author
Owner

@Wimeremce7 commented on GitHub (Mar 21, 2025):

V1.0.1:
Image

V0.15.3:

Image
@Wimeremce7 commented on GitHub (Mar 21, 2025): V1.0.1: ![Image](https://github.com/user-attachments/assets/c7a55b74-0e04-4193-bfb2-583d1b35bce4) V0.15.3: <img width="356" alt="Image" src="https://github.com/user-attachments/assets/dfd9eee1-a7b5-48f6-925c-f73ca6405a46" />
Author
Owner

@Wimeremce7 commented on GitHub (Mar 21, 2025):

The significance of using this tool is that some files are not mandatory. If I directly use file extraction nodes without uploading files, there will be errors. After I encapsulate it, there will be no errors.

@Wimeremce7 commented on GitHub (Mar 21, 2025): The significance of using this tool is that some files are not mandatory. If I directly use file extraction nodes without uploading files, there will be errors. After I encapsulate it, there will be no errors.
Author
Owner

@Sakura4036 commented on GitHub (Mar 24, 2025):

version 1.1.2 shows parameter type is files instead of file-list.

Image

@Sakura4036 commented on GitHub (Mar 24, 2025): version 1.1.2 shows parameter type is `files` instead of `file-list`. ![Image](https://github.com/user-attachments/assets/13ebbe85-30ed-476e-8132-f5ac83e8d9f5)
Author
Owner

@Sakura4036 commented on GitHub (Mar 24, 2025):

The significance of using this tool is that some files are not mandatory. If I directly use file extraction nodes without uploading files, there will be errors. After I encapsulate it, there will be no errors.

I don't quite understand your question. Do you want the dify workflow to raise error after not uploading the file or not?

@Sakura4036 commented on GitHub (Mar 24, 2025): > The significance of using this tool is that some files are not mandatory. If I directly use file extraction nodes without uploading files, there will be errors. After I encapsulate it, there will be no errors. I don't quite understand your question. Do you want the dify workflow to raise error after not uploading the file or not?
Author
Owner

@Wimeremce7 commented on GitHub (Mar 24, 2025):

The significance of using this tool is that some files are not mandatory. If I directly use file extraction nodes without uploading files, there will be errors. After I encapsulate it, there will be no errors.

I don't quite understand your question. Do you want the dify workflow to raise error after not uploading the file or not?

我的意思是这样的,我做这个工具的目的是:我去做工作流的时候,有请求参数是文档上传,但是这个文档上传参数不是必须的,所以我做这个工具来判断一下,避免报错。因为我尝试了一下直接用文档提取,如果我不上传文档,就会报错。

What I mean is that the purpose of creating this tool is to: when I am working on a workflow, there is a request parameter for document upload, but this document upload parameter is not necessary, so I am creating this tool to determine and avoid errors. Because I tried extracting directly from the document, but if I don't upload the document, there will be an error.

@Wimeremce7 commented on GitHub (Mar 24, 2025): > > The significance of using this tool is that some files are not mandatory. If I directly use file extraction nodes without uploading files, there will be errors. After I encapsulate it, there will be no errors. > > I don't quite understand your question. Do you want the dify workflow to raise error after not uploading the file or not? 我的意思是这样的,我做这个工具的目的是:我去做工作流的时候,有请求参数是文档上传,但是这个文档上传参数不是必须的,所以我做这个工具来判断一下,避免报错。因为我尝试了一下直接用文档提取,如果我不上传文档,就会报错。 What I mean is that the purpose of creating this tool is to: when I am working on a workflow, there is a request parameter for document upload, but this document upload parameter is not necessary, so I am creating this tool to determine and avoid errors. Because I tried extracting directly from the document, but if I don't upload the document, there will be an error.
Author
Owner

@Wimeremce7 commented on GitHub (Mar 24, 2025):

The significance of using this tool is that some files are not mandatory. If I directly use file extraction nodes without uploading files, there will be errors. After I encapsulate it, there will be no errors.

I don't quite understand your question. Do you want the dify workflow to raise error after not uploading the file or not?

我的意思是这样的,我做这个工具的目的是:我去做工作流的时候,有请求参数是文档上传,但是这个文档上传参数不是必须的,所以我做这个工具来判断一下,避免报错。因为我尝试了一下直接用文档提取,如果我不上传文档,就会报错。

What I mean is that the purpose of creating this tool is to: when I am working on a workflow, there is a request parameter for document upload, but this document upload parameter is not necessary, so I am creating this tool to determine and avoid errors. Because I tried extracting directly from the document, but if I don't upload the document, there will be an error.

我用这个方式在0.15.3是没问题的。更新到1.0.1之后,这个工具不起作用了,只要我不上传文档,就会报错。

I have no problem using this method at 0.15.3. After updating to 1.0.1, this tool no longer works. As long as I don't upload the document, it will report an error.

@Wimeremce7 commented on GitHub (Mar 24, 2025): > > > The significance of using this tool is that some files are not mandatory. If I directly use file extraction nodes without uploading files, there will be errors. After I encapsulate it, there will be no errors. > > > > > > I don't quite understand your question. Do you want the dify workflow to raise error after not uploading the file or not? > > 我的意思是这样的,我做这个工具的目的是:我去做工作流的时候,有请求参数是文档上传,但是这个文档上传参数不是必须的,所以我做这个工具来判断一下,避免报错。因为我尝试了一下直接用文档提取,如果我不上传文档,就会报错。 > > What I mean is that the purpose of creating this tool is to: when I am working on a workflow, there is a request parameter for document upload, but this document upload parameter is not necessary, so I am creating this tool to determine and avoid errors. Because I tried extracting directly from the document, but if I don't upload the document, there will be an error. 我用这个方式在0.15.3是没问题的。更新到1.0.1之后,这个工具不起作用了,只要我不上传文档,就会报错。 I have no problem using this method at 0.15.3. After updating to 1.0.1, this tool no longer works. As long as I don't upload the document, it will report an error.
Author
Owner

@Sakura4036 commented on GitHub (Mar 24, 2025):

I understand now. The current issue is that the parameter is defined as optional through the workflow customization tool, but it has not taken effect yet. The parameter will still be validated and cannot be null.

@Sakura4036 commented on GitHub (Mar 24, 2025): I understand now. The current issue is that the parameter is defined as optional through the workflow customization tool, but it has not taken effect yet. The parameter will still be validated and cannot be null.
Author
Owner

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

Hi, @Wimeremce7. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You reported a bug after updating from version 0.15.3 to 1.0.1, where a custom tool's input parameter type changed.
  • The tool was designed to handle optional file uploads, which worked in version 0.15.3 but fails in 1.0.1.
  • Sakura4036 noted that in version 1.1.2, the parameter type is files instead of file-list, and the issue is due to optional parameters being validated as non-null.
  • I suggested checking a migration guide for insights.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the Dify repository. If it is, you can keep the discussion open by commenting on the issue.
  • Otherwise, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Apr 25, 2025): Hi, @Wimeremce7. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You reported a bug after updating from version 0.15.3 to 1.0.1, where a custom tool's input parameter type changed. - The tool was designed to handle optional file uploads, which worked in version 0.15.3 but fails in 1.0.1. - Sakura4036 noted that in version 1.1.2, the parameter type is `files` instead of `file-list`, and the issue is due to optional parameters being validated as non-null. - I suggested checking a migration guide for insights. **Next Steps:** - Please confirm if this issue is still relevant to the latest version of the Dify repository. If it is, you can keep the discussion open by commenting on the issue. - Otherwise, the issue will be automatically closed in 15 days. Thank you 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#11930