dify/api/core/plugin
Taranum01 dcdca603e7 fix(plugin): fall back to generic listing when category route 404s
Fixes #40683

`PluginInstaller.list_plugins_by_category` calls
`GET /plugin/{tenant_id}/management/{category}/list` on the plugin
daemon. Local plugin daemons (e.g. 0.6.x) don't expose the
category-segmented route and return 404. The current code raises
this 404, which then breaks the model-provider integration page
even though the generic listing route is available.

On 404, fall back to
`GET /plugin/{tenant_id}/management/list` and filter the result
locally by `declaration.category`. The generic route is the same
one used by the unrestricted `list_plugins_with_total`. Apply the
caller's page/page_size on the filtered result (cap page_size at
1000 for the fallback fetch — adequate for any reasonable category).

Added a regression test in `test_plugin_manager.py` that
asserts the 404-fallback path produces the correct filtered list
with the right `has_more` flag.
2026-08-14 23:21:31 +05:30
..
backwards_invocation fix(api): chain original exception in 13 except blocks per PEP 3134 (#40738) 2026-08-13 17:50:05 +00:00
endpoint fix: handle EndpointSetupFailedError in BasePluginClient (#19613) 2025-05-15 13:59:43 +08:00
entities fix(api): chain original exception in 13 except blocks per PEP 3134 (#40738) 2026-08-13 17:50:05 +00:00
impl fix(plugin): fall back to generic listing when category route 404s 2026-08-14 23:21:31 +05:30
utils refactor: replace isinstance chains with match-case (#24487) (#37482) 2026-06-16 04:41:31 +00:00
plugin_service.py refactor(api): consolidate deployment edition handling (#40142) 2026-08-11 07:39:01 +00:00
provider_identity.py fix(agent): normalize plugin provider identities (#40619) 2026-08-13 07:22:41 +00:00