diff --git a/api/core/model_providers/model_provider_factory.py b/api/core/model_providers/model_provider_factory.py index 77f77573475a1c..985dc274b37762 100644 --- a/api/core/model_providers/model_provider_factory.py +++ b/api/core/model_providers/model_provider_factory.py @@ -211,6 +211,9 @@ def _get_preferred_provider(cls, tenant_id: str, model_provider_name: str): Provider.quota_type == ProviderQuotaType.TRIAL.value ).first() + if provider.quota_limit == 0: + return None + return provider no_system_provider = True