Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Fix/custom model credentials (#14450)

Yeuolya9dda1554e7c
diff --git a/api/core/plugin/entities/plugin.py b/api/core/plugin/entities/plugin.py
index 732e10c1913..c61e848a425 100644
--- a/api/core/plugin/entities/plugin.py
+++ b/api/core/plugin/entities/plugin.py
@@ -180,7 +180,7 @@ class ToolProviderID(GenericProviderID):
def __init__(self, value: str, is_hardcoded: bool = False) -> None:
super().__init__(value, is_hardcoded)
if self.organization == "langgenius":
- if self.provider_name in ["jina", "siliconflow", "stepfun"]:
+ if self.provider_name in ["jina", "siliconflow", "stepfun", "gitee_ai"]:
self.plugin_name = f"{self.provider_name}_tool"
diff --git a/api/core/provider_manager.py b/api/core/provider_manager.py
index 918840530b0..7d8ff189835 100644
--- a/api/core/provider_manager.py
+++ b/api/core/provider_manager.py
@@ -111,6 +111,12 @@ class ProviderManager:
# Get all provider model records of the workspace
provider_name_to_provider_model_records_dict = self._get_all_provider_models(tenant_id)
+ for provider_name in list(provider_name_to_provider_model_records_dict.keys()):
+ provider_id = ModelProviderID(provider_name)
+ if str(provider_id) not in provider_name_to_provider_model_records_dict:
+ provider_name_to_provider_model_records_dict[str(provider_id)] = (
+ provider_name_to_provider_model_records_dict[provider_name]
+ )
# Get all provider entities
model_provider_factory = ModelProviderFactory(tenant_id)