关于自定义工具在使用时会被自动移除的问题

:speech_balloon: Feedback Title

自定义的工具在使用时被自动移除

虽然刚添加时还能配合提示词进行调试。但是离开界面后,不管有没有保存,回到该智能体编排界面都会显示黄色感叹号(工具已被移除)。在排除了异步检测接口(在离开界面后,dify里有一个异步检测工具能否使用的逻辑,会自行ping接口的url,如果连接不了,会自动移除工具)的原因后,黄色感叹号依然存在。

在排除了防火墙等通信问题后,终于在数据库的逻辑里发现了盲点:数据库里的工具id是api_provider.id,是一个UUID类型的值,而自定义工具在添加时的provider_id则是字符串类型,在添加自定义工具后,python后端尝试链接两个值时就会永远返回False(即使值相同,但是由于类型不同无法匹配),工具提供商被判定为"找不到",进而系统认为该工具的提供商已不存在,标记为deleted_tools,并在前端显示“工具已被移除”。而这个问题在本次更新后并没有得到解决

:clipboard: Feedback Type

Please select one:

  • :bug: Bug Report (something broken on the forum)
  • :light_bulb: Feature Suggestion (new feature for the forum)
  • :artist_palette: Design/UI Improvement
  • :memo: Content Suggestion (categories, guidelines, etc.)
  • :thinking: Question about the forum
  • :clap: Appreciation/Compliment
  • :bar_chart: Other feedback

:bullseye: What’s Your Feedback?

[Describe your feedback, suggestion, or issue with the Discourse community]

:camera_with_flash: Screenshots (if applicable)

[Add screenshots to illustrate your point]

:thought_balloon: Why Is This Important?

[Explain how this would improve the community experience]

:wrench: Suggested Solution (optional)

[If you have ideas on how to address this, share them here]

:globe_with_meridians: Browser/Device (for bug reports)

  • Browser:
  • Device: [Desktop/Mobile/Tablet]
  • Operating System:

:paperclip: Additional Context

[Any other relevant information]


Thank you for helping us improve the Dify Community! :folded_hands: