Fix paddle ocr / minerU cannot add (#15858)

Fix paddle ocr / minerU cannot add
This commit is contained in:
Wang Qi
2026-06-10 13:04:13 +08:00
committed by GitHub
parent 7f4bf69f05
commit 9aa81e7cad
8 changed files with 140 additions and 46 deletions

View File

@@ -16,6 +16,7 @@
import os
import logging
from api.db.joint_services.tenant_model_service import ensure_mineru_from_env, ensure_paddleocr_from_env
from common.constants import ActiveStatusEnum, LLMType
from common.settings import FACTORY_LLM_INFOS
from api.db.services.tenant_model_provider_service import TenantModelProviderService
@@ -301,6 +302,9 @@ def list_tenant_added_models(tenant_id: str, model_type_filter: str=None):
if not e:
return False, "Tenant not found"
ensure_mineru_from_env(tenant_id)
ensure_paddleocr_from_env(tenant_id)
if model_type_filter:
model_type_filter = model_type_filter.lower()