Fix/custom model credentials (#14450)

This commit is contained in:
Yeuoly 2025-02-27 13:35:41 +08:00 committed by GitHub
parent 9a417bfc5e
commit a9dda1554e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -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"

View File

@ -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)