Skip to content

Commit

Permalink
fix: return wrong when init 0 quota in trial provider (#1394)
Browse files Browse the repository at this point in the history
  • Loading branch information
takatost authored Oct 21, 2023
1 parent 4c63cbf commit e122d67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/core/model_providers/model_provider_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e122d67

Please sign in to comment.