dify - 💡(How to fix) Fix Cache plugin model provider discovery across runs with tenant-scoped invalidation [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Plugin-backed model provider discovery currently relies on repeated daemon reads in runtime paths. This can add avoidable latency across workflow/app runs and makes cache ownership harder to reason about when plugin lifecycle operations mutate installed provider metadata.

Root Cause

Plugin-backed model provider discovery currently relies on repeated daemon reads in runtime paths. This can add avoidable latency across workflow/app runs and makes cache ownership harder to reason about when plugin lifecycle operations mutate installed provider metadata.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Summary

Plugin-backed model provider discovery currently relies on repeated daemon reads in runtime paths. This can add avoidable latency across workflow/app runs and makes cache ownership harder to reason about when plugin lifecycle operations mutate installed provider metadata.

Proposal

Add a tenant-scoped TTL cache for plugin model provider discovery and make plugin lifecycle operations invalidate that cache when a tenant installs, uninstalls, or upgrades plugins.

Keep the cache owner inside the core plugin layer so provider reads and plugin lifecycle mutations share one implementation boundary. PluginModelRuntime should receive the plugin service dependency during construction and delegate provider discovery to it.

Expected impact

  • Reuse plugin model provider metadata across runs while preserving tenant isolation.
  • Avoid request-scoped provider caches that can diverge from plugin lifecycle changes.
  • Centralize plugin provider metadata cache read/write/invalidation behavior in the core plugin service.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING