mirror of https://github.com/langgenius/dify.git
feat(oauth): enhance tool provider updates with name validation and include credential ID in agent tools
This commit is contained in:
parent
f9c4897ff3
commit
458e44133e
|
|
@ -39,6 +39,7 @@ class AgentConfigManager:
|
|||
"provider_id": tool["provider_id"],
|
||||
"tool_name": tool["tool_name"],
|
||||
"tool_parameters": tool.get("tool_parameters", {}),
|
||||
"credential_id": tool.get("credential_id", None),
|
||||
}
|
||||
|
||||
agent_tools.append(AgentToolEntity(**agent_tool_properties))
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ class BuiltinToolManageService:
|
|||
cache.delete()
|
||||
|
||||
# update name if provided
|
||||
if name:
|
||||
if name and name != db_provider.name:
|
||||
# check if the name is already used
|
||||
if (
|
||||
session.query(BuiltinToolProvider)
|
||||
|
|
|
|||
Loading…
Reference in New Issue