mirror of https://github.com/kortix-ai/suna.git
Allow unlimited custom agents in local environment mode
Co-authored-by: sharath <sharath@kortix.ai>
This commit is contained in:
parent
23514db06d
commit
97c1334e6f
|
@ -142,6 +142,16 @@ async def check_agent_run_limit(client, account_id: str) -> Dict[str, Any]:
|
||||||
|
|
||||||
async def check_agent_count_limit(client, account_id: str) -> Dict[str, Any]:
|
async def check_agent_count_limit(client, account_id: str) -> Dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
|
# In local mode, allow practically unlimited custom agents
|
||||||
|
if config.ENV_MODE.value == "local":
|
||||||
|
logger.debug(f"Local mode detected - bypassing agent count limit for account {account_id}")
|
||||||
|
return {
|
||||||
|
'can_create': True,
|
||||||
|
'current_count': 0, # Return 0 to avoid showing any limit warnings
|
||||||
|
'limit': 999999, # Practically unlimited
|
||||||
|
'tier_name': 'local'
|
||||||
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = await Cache.get(f"agent_count_limit:{account_id}")
|
result = await Cache.get(f"agent_count_limit:{account_id}")
|
||||||
if result:
|
if result:
|
||||||
|
|
|
@ -272,6 +272,7 @@ class Configuration:
|
||||||
_MAX_PARALLEL_AGENT_RUNS_ENV: Optional[str] = None
|
_MAX_PARALLEL_AGENT_RUNS_ENV: Optional[str] = None
|
||||||
|
|
||||||
# Agent limits per billing tier
|
# Agent limits per billing tier
|
||||||
|
# Note: These limits are bypassed in local mode (ENV_MODE=local) where unlimited agents are allowed
|
||||||
AGENT_LIMITS = {
|
AGENT_LIMITS = {
|
||||||
'free': 2,
|
'free': 2,
|
||||||
'tier_2_20': 5,
|
'tier_2_20': 5,
|
||||||
|
|
Loading…
Reference in New Issue