Make API Key optional in Dify when credentials_for_provider is marked as optionalhow to set #310

Closed
opened 2026-02-22 17:25:37 -05:00 by yindo · 1 comment
Owner

Originally created by @XinyueDu on GitHub (Oct 12, 2025).

Issue Description

When developing a Dify plugin, I set credentials_for_provider as an optional field in the schema. However, the Dify platform still forces users to fill in an API Key before the plugin can be enabled.

Schema Config:

credentials_for_provider: #Add credentials_for_provider field
  VIS_REQUEST_SERVER:
    type: text-input
    required: false
    label:
      en_US: VIS_REQUEST_SERVER (AntV Visualization Chart provides a free chart generation service by default. For users with a need for private deployment, they can try using `VIS_REQUEST_SERVER` to customize their own chart generation service)
      zh_Hans: VIS_REQUEST_SERVER(AntV 可视化图表默认提供免费图表生成服务。对于需要私有部署的用户,可以尝试使用 `VIS_REQUEST_SERVER` 自定义自己的图表生成服务)
    placeholder:
      en_US: Please input your VIS_REQUEST_SERVER.
      zh_Hans: 请输入你的 VIS_REQUEST_SERVER。

Dify Plugin usage:

Image

Expected behavior

If credentials_for_provider is declared optional, the API Key input should also become optional so that the plugin can be used without being blocked.

Originally created by @XinyueDu on GitHub (Oct 12, 2025). ### Issue Description When developing a Dify plugin, I set credentials_for_provider as an optional field in the schema. However, the Dify platform still forces users to fill in an API Key before the plugin can be enabled. Schema Config: ```json credentials_for_provider: #Add credentials_for_provider field VIS_REQUEST_SERVER: type: text-input required: false label: en_US: VIS_REQUEST_SERVER (AntV Visualization Chart provides a free chart generation service by default. For users with a need for private deployment, they can try using `VIS_REQUEST_SERVER` to customize their own chart generation service) zh_Hans: VIS_REQUEST_SERVER(AntV 可视化图表默认提供免费图表生成服务。对于需要私有部署的用户,可以尝试使用 `VIS_REQUEST_SERVER` 自定义自己的图表生成服务) placeholder: en_US: Please input your VIS_REQUEST_SERVER. zh_Hans: 请输入你的 VIS_REQUEST_SERVER。 ``` Dify Plugin usage: <img width="3840" height="1920" alt="Image" src="https://github.com/user-attachments/assets/bb701719-b755-4ec3-8865-81f3e70bbb8e" /> ### Expected behavior If credentials_for_provider is declared optional, the API Key input should also become optional so that the plugin can be used without being blocked.
yindo closed this issue 2026-02-22 17:25:37 -05:00
Author
Owner

@crazywoola commented on GitHub (Feb 3, 2026):

Hi @XinyueDu, thanks for opening this issue.

Why this is being closed

Dify issue tracking requires English-only issue title and description for consistent collaboration.

Next steps

Please open a new issue in English and include clear details so maintainers can help efficiently.

Thanks for understanding and for your support.

@crazywoola commented on GitHub (Feb 3, 2026): Hi @XinyueDu, thanks for opening this issue. ### Why this is being closed Dify issue tracking requires English-only issue title and description for consistent collaboration. ### Next steps Please open a new issue in English and include clear details so maintainers can help efficiently. Thanks for understanding and for your support.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugins#310