Summary
Older or mixed-version plugin daemon deployments may return plugin list data directly as an array instead of the newer object shape with list and total fields. Dify currently validates plugin list responses as the object shape only, so a successful daemon response can fail during response validation.
Expected behavior
Dify should accept both plugin daemon list response shapes:
- object shape with list and total
- legacy top-level array shape
- legacy data array shape
The legacy shapes should be normalized into the current list/total response model before Pydantic validation.
Impact
Mixed-version or rolling-upgrade deployments can break plugin listing even when the plugin daemon request succeeds.
Proposed fix
Normalize legacy list payloads in the plugin daemon response handling path before constructing PluginListResponse.
Related PR
Original implementation PR: #38265
Summary
Older or mixed-version plugin daemon deployments may return plugin list data directly as an array instead of the newer object shape with list and total fields. Dify currently validates plugin list responses as the object shape only, so a successful daemon response can fail during response validation.
Expected behavior
Dify should accept both plugin daemon list response shapes:
The legacy shapes should be normalized into the current list/total response model before Pydantic validation.
Impact
Mixed-version or rolling-upgrade deployments can break plugin listing even when the plugin daemon request succeeds.
Proposed fix
Normalize legacy list payloads in the plugin daemon response handling path before constructing PluginListResponse.
Related PR
Original implementation PR: #38265