you have not added provider None #6649

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

Originally created by @smyhw on GitHub (Nov 10, 2024).

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

0.11.0

Cloud or Self Hosted

Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

Sorry, some sentences used translation software, so there may be grammatical issues. QwQ

The name of the custom tool (api tool) allows the use of spaces and other whitespace characters; however, when whitespace characters are used as a suffix, such as in fetchCustomToolList, get requests will not correctly pass that parameter.

Therefore, when adding or modifying a tool, if the tool name has a whitespace character suffix, it can be saved normally, but when selected again, it will return the error you have not added provider None.

(The error logic also has issues, as it does not display the correct tool name passed in but outputs None instead.)

I will try to submit a PR to fix it later.

✔️ Expected Behavior

Trailing spaces will be removed or ignored when saving

Actual Behavior

Error you have not added provider None

Originally created by @smyhw on GitHub (Nov 10, 2024). ### 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 0.11.0 ### Cloud or Self Hosted Self Hosted (Docker), Self Hosted (Source) ### Steps to reproduce Sorry, some sentences used translation software, so there may be grammatical issues. QwQ The name of the custom tool (api tool) allows the use of spaces and other whitespace characters; however, when whitespace characters are used as a suffix, such as in `fetchCustomToolList`, `get` requests will not correctly pass that parameter. Therefore, when adding or modifying a tool, if the tool name has a whitespace character suffix, it can be saved normally, but when selected again, it will return the error `you have not added provider None`. (The error logic also has issues, as it does not display the correct tool name passed in but outputs None instead.) *I will try to submit a PR to fix it later.* ### ✔️ Expected Behavior Trailing spaces will be removed or ignored when saving ### ❌ Actual Behavior Error `you have not added provider None`
yindo added the 🐞 bug label 2026-02-21 18:16:42 -05:00
yindo closed this issue 2026-02-21 18:16:42 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 10, 2024):

@smyhw Hello there! I'm here to help you with bugs, questions, and becoming a contributor. Let me know how I can assist you while waiting for a human maintainer.

The error message "you have not added provider None" might be related to how Dify handles tool names with trailing spaces. Currently, Dify does not allow custom tool names with whitespace characters, as the "Tool call name" only supports numbers, letters, and underscores [1]. However, it seems that there might be a gap in validation or sanitization when saving tool names, allowing names with trailing spaces to be saved but causing issues when retrieved.

To address this, you might consider implementing a trimming or sanitization step when saving tool names to ensure that trailing spaces are removed. Dify does have existing logic to sanitize input fields, such as removing null characters, which could be extended to handle trailing spaces [2].

If you're planning to submit a PR, focusing on enhancing the validation and sanitization logic for tool names would be a good approach to prevent such issues.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 10, 2024): <!-- Greeting --> @smyhw Hello there! I'm here to help you with bugs, questions, and becoming a contributor. Let me know how I can assist you while waiting for a human maintainer. <!-- Answer --> The error message "you have not added provider None" might be related to how Dify handles tool names with trailing spaces. Currently, Dify does not allow custom tool names with whitespace characters, as the "Tool call name" only supports numbers, letters, and underscores <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/i18n/en-US/tools.ts)</sup>. However, it seems that there might be a gap in validation or sanitization when saving tool names, allowing names with trailing spaces to be saved but causing issues when retrieved. To address this, you might consider implementing a trimming or sanitization step when saving tool names to ensure that trailing spaces are removed. Dify does have existing logic to sanitize input fields, such as removing null characters, which could be extended to handle trailing spaces <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/app/apps/base_app_generator.py)</sup>. If you're planning to submit a PR, focusing on enhancing the validation and sanitization logic for tool names would be a good approach to prevent such issues. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6649