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.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: When the user is a non-sandbox user and has a paid balance, the … (#32173)
zyssyz1237dabc03a0837
diff --git a/api/services/workspace_service.py b/api/services/workspace_service.pyindex 3ee41c2e8d8..84a8b033296 100644--- a/api/services/workspace_service.py+++ b/api/services/workspace_service.py@@ -1,6 +1,7 @@from flask_login import current_userfrom configs import dify_config+from enums.cloud_plan import CloudPlanfrom extensions.ext_database import dbfrom models.account import Tenant, TenantAccountJoin, TenantAccountRolefrom services.account_service import TenantService@@ -53,7 +54,12 @@ class WorkspaceService:from services.credit_pool_service import CreditPoolServicepaid_pool = CreditPoolService.get_pool(tenant_id=tenant.id, pool_type="paid")- if paid_pool:+ # if the tenant is not on the sandbox plan and the paid pool is not full, use the paid pool+ if (+ feature.billing.subscription.plan != CloudPlan.SANDBOX+ and paid_pool is not None+ and (paid_pool.quota_limit == -1 or paid_pool.quota_limit > paid_pool.quota_used)+ ):tenant_info["trial_credits"] = paid_pool.quota_limittenant_info["trial_credits_used"] = paid_pool.quota_usedelse: