Merge remote-tracking branch 'origin/main' into enhance/render-html

This commit is contained in:
a7m-1st 2026-01-21 06:21:44 +03:00
commit 98172e57b2
6 changed files with 10 additions and 8 deletions

View file

@ -29,7 +29,7 @@ def create_agent(
model_type=mtype,
api_key=api_key,
url=url,
timeout=10,
timeout=60, # 1 minute for validation
model_config_dict=model_config_dict,
**kwargs,
)
@ -37,6 +37,6 @@ def create_agent(
system_message="You are a helpful assistant that must use the tool get_website_content to get the content of a website.",
model=model,
tools=[get_website_content],
step_timeout=900,
step_timeout=1800, # 30 minutes
)
return agent

View file

@ -36,8 +36,8 @@ router = APIRouter()
# Create traceroot logger for chat controller
chat_logger = traceroot.get_logger("chat_controller")
# SSE timeout configuration (30 minutes in seconds)
SSE_TIMEOUT_SECONDS = 30 * 60
# SSE timeout configuration (60 minutes in seconds)
SSE_TIMEOUT_SECONDS = 60 * 60
async def _cleanup_task_lock_safe(task_lock, reason: str) -> bool:

View file

@ -154,7 +154,7 @@ def collect_previous_task_context(working_directory: str, previous_task_content:
return "\n".join(context_parts)
def check_conversation_history_length(task_lock: TaskLock, max_length: int = 100000) -> tuple[bool, int]:
def check_conversation_history_length(task_lock: TaskLock, max_length: int = 200000) -> tuple[bool, int]:
"""
Check if conversation history exceeds maximum length

View file

@ -503,7 +503,7 @@ async def _periodic_cleanup():
await asyncio.sleep(300) # Run every 5 minutes
current_time = datetime.now()
stale_timeout = timedelta(hours=2) # Consider tasks stale after 2 hours
stale_timeout = timedelta(hours=4) # Consider tasks stale after 4 hours
stale_ids = []
for task_id, task_lock in task_locks.items():

View file

@ -173,7 +173,7 @@ class ListenChatAgent(ChatAgent):
pause_event: asyncio.Event | None = None,
prune_tool_calls_from_memory: bool = False,
enable_snapshot_clean: bool = False,
step_timeout: float | None = 900,
step_timeout: float | None = 1800, # 30 minutes
**kwargs: Any,
) -> None:
super().__init__(
@ -805,6 +805,7 @@ def agent_model(
api_key=options.api_key,
url=options.api_url,
model_config_dict=model_config or None,
timeout=600, # 10 minutes
**init_params,
)
@ -1855,6 +1856,7 @@ async def mcp_agent(options: Chat):
if options.is_cloud()
else None
),
timeout=600, # 10 minutes
**{
k: v
for k, v in (options.extra_params or {}).items()

View file

@ -61,7 +61,7 @@ class Workforce(BaseWorkforce):
graceful_shutdown_timeout=graceful_shutdown_timeout,
share_memory=share_memory,
use_structured_output_handler=use_structured_output_handler,
task_timeout_seconds=1800, # 30 minutes
task_timeout_seconds=3600, # 60 minutes
failure_handling_config=FailureHandlingConfig(
enabled_strategies=["retry", "replan"],
),