Skip to content

Support legacy plugin daemon list response shapes #40837

Description

@Zenine

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions