mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 11:04:27 +08:00
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. |
||
|---|---|---|
| .. | ||
| agent.py | ||
| asset.py | ||
| base.py | ||
| datasource.py | ||
| debugging.py | ||
| dynamic_select.py | ||
| endpoint.py | ||
| exc.py | ||
| model_runtime_factory.py | ||
| model_runtime.py | ||
| model.py | ||
| oauth.py | ||
| plugin.py | ||
| tool.py | ||
| trigger.py | ||