mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
The Builder recommended every installed tool as ready to use without ever checking whether its provider actually has credentials configured. A credentialed tool with no tool_builtin_providers row got bound into a plan and then failed at test time with an authorization error the user can't act on. tool_catalogue.py now carries provider_controller.need_credentials onto each ToolCatalogueEntry as needs_credentials. resources.py resolves which providers are actually authorized for the tenant (mirroring ToolTransformService.builtin_provider_to_user_provider's need_credentials / db_provider rule exactly, so the Builder and the console's tools page can never disagree) and sets ResourceRef.readiness to "missing_config" for a credentialed tool with no authorized provider row, "ready" otherwise. Datasets and models are unaffected. If the authorization query itself fails, readiness fails open to "ready" rather than mass-labeling every credentialed tool unauthorized on a transient error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>