feat(api): add end-user tool credential configuration (#44406)

This commit is contained in:
林玮 (Jade Lin) authored and GitHub committed 2026-10-21 10:48:33 +08:00
1 parent baf1188f8a
commit f89d647429
10 files changed
+842 -2

No files matched your search

+6
View File
@@ -550,6 +550,12 @@ class DifyToolNodeRuntime(ToolNodeRuntimeProtocol):
variable_pool,
node_execution_id: str | None = None,
) -> ToolRuntimeHandle:
# Dify owns credential selection; reject unsupported sources before resolving workspace credentials.
source = node_data.get("credential_source", "workspace")
if source != "workspace":
raise ToolRuntimeResolutionError(
f"Tool node {node_id!r}: credential source {source!r} is not supported by this runtime yet."
)
try:
tool_runtime = ToolManager.get_workflow_tool_runtime(
self._run_context.tenant_id,