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: return wrong when init 0 quota in trial provider (#1394)

takatoste122d677ada8
diff --git a/api/core/model_providers/model_provider_factory.py b/api/core/model_providers/model_provider_factory.py
index 77f77573475..985dc274b37 100644
--- a/api/core/model_providers/model_provider_factory.py
+++ b/api/core/model_providers/model_provider_factory.py
@@ -211,6 +211,9 @@ class ModelProviderFactory:
Provider.quota_type == ProviderQuotaType.TRIAL.value
).first()
+ if provider.quota_limit == 0:
+ return None
+
return provider
no_system_provider = True