mirror of https://github.com/kortix-ai/suna.git
make free trial worth 5 dollars
This commit is contained in:
parent
472a11753c
commit
9803d3b0d8
|
@ -6,7 +6,7 @@ from core.utils.config import config
|
|||
TRIAL_ENABLED = True
|
||||
TRIAL_DURATION_DAYS = 7
|
||||
TRIAL_TIER = "tier_2_20"
|
||||
TRIAL_CREDITS = Decimal("20.00")
|
||||
TRIAL_CREDITS = Decimal("5.00")
|
||||
|
||||
TOKEN_PRICE_MULTIPLIER = Decimal('1.2')
|
||||
MINIMUM_CREDIT_FOR_RUN = Decimal('0.01')
|
||||
|
|
|
@ -825,7 +825,7 @@ async def get_allowed_models_for_user(client, user_id: str):
|
|||
|
||||
# If user has an active trial, they get paid tier access
|
||||
if trial_status == 'active':
|
||||
tier_name = 'tier_2_20' # Trial gives access to $20 tier
|
||||
tier_name = 'tier_2_20' # Trial gives access to Starter tier features
|
||||
else:
|
||||
tier_name = credit_account.get('tier', 'none')
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@ async def fix_trial_users():
|
|||
expiring = Decimal(str(account.get('expiring_credits', 0)))
|
||||
balance = Decimal(str(account.get('balance', 0)))
|
||||
|
||||
# Check if user has exactly $20 in non-expiring credits (the trial amount)
|
||||
if non_expiring >= Decimal('20') and trial_status in ['active', 'converted']:
|
||||
|
||||
if non_expiring >= Decimal('5') and trial_status in ['active', 'converted']:
|
||||
print(f"\nUser {account_id[:8]}... has incorrect trial credits:")
|
||||
print(f" Trial Status: {trial_status}")
|
||||
print(f" Current Balance: ${balance}")
|
||||
|
@ -51,7 +51,7 @@ async def fix_trial_users():
|
|||
print(f" Expiring: ${expiring}")
|
||||
|
||||
# Calculate the correction
|
||||
trial_amount = Decimal('20')
|
||||
trial_amount = Decimal('5')
|
||||
corrected_non_expiring = non_expiring - trial_amount
|
||||
corrected_expiring = expiring + trial_amount
|
||||
|
||||
|
@ -75,7 +75,7 @@ async def fix_trial_users():
|
|||
'amount': 0, # No balance change, just reclassification
|
||||
'balance_after': float(balance),
|
||||
'type': 'adjustment',
|
||||
'description': 'Fixed trial credits: moved $20 from non-expiring to expiring'
|
||||
'description': 'Fixed trial credits: moved $5 from non-expiring to expiring'
|
||||
}).execute()
|
||||
|
||||
print(f" ✅ Fixed credits for user {account_id[:8]}...")
|
||||
|
|
Loading…
Reference in New Issue