diff --git a/strix/interface/main.py b/strix/interface/main.py index 9ec17e5..c6ebe2b 100644 --- a/strix/interface/main.py +++ b/strix/interface/main.py @@ -212,7 +212,7 @@ async def warm_up_llm() -> None: {"role": "user", "content": "Reply with just 'OK'."}, ] - llm_timeout = int(Config.get("llm_timeout")) # type: ignore[arg-type] + llm_timeout = int(Config.get("llm_timeout") or "300") completion_kwargs: dict[str, Any] = { "model": model_name, diff --git a/strix/llm/config.py b/strix/llm/config.py index 609b628..3426327 100644 --- a/strix/llm/config.py +++ b/strix/llm/config.py @@ -18,6 +18,6 @@ class LLMConfig: self.enable_prompt_caching = enable_prompt_caching self.skills = skills or [] - self.timeout = timeout or int(Config.get("llm_timeout")) # type: ignore[arg-type] + self.timeout = timeout or int(Config.get("llm_timeout") or "300") self.scan_mode = scan_mode if scan_mode in ["quick", "standard", "deep"] else "deep" diff --git a/strix/llm/request_queue.py b/strix/llm/request_queue.py index c3ddc37..de249e2 100644 --- a/strix/llm/request_queue.py +++ b/strix/llm/request_queue.py @@ -12,8 +12,8 @@ from strix.config import Config class LLMRequestQueue: def __init__(self, max_concurrent: int = 1, delay_between_requests: float = 4.0): - delay_between_requests = float(Config.get("llm_rate_limit_delay")) # type: ignore[arg-type] - max_concurrent = int(Config.get("llm_rate_limit_concurrent")) # type: ignore[arg-type] + delay_between_requests = float(Config.get("llm_rate_limit_delay") or "4.0") + max_concurrent = int(Config.get("llm_rate_limit_concurrent") or "1") self.max_concurrent = max_concurrent self.delay_between_requests = delay_between_requests diff --git a/strix/runtime/docker_runtime.py b/strix/runtime/docker_runtime.py index 4719833..a870160 100644 --- a/strix/runtime/docker_runtime.py +++ b/strix/runtime/docker_runtime.py @@ -122,7 +122,7 @@ class DockerRuntime(AbstractRuntime): for attempt in range(max_retries): try: - self._verify_image_available(Config.get("strix_image")) # type: ignore[arg-type] + self._verify_image_available(Config.get("strix_image") or "") try: existing_container = self.client.containers.get(container_name) diff --git a/strix/tools/executor.py b/strix/tools/executor.py index 1ec0375..9dbc74e 100644 --- a/strix/tools/executor.py +++ b/strix/tools/executor.py @@ -19,8 +19,8 @@ from .registry import ( ) -SANDBOX_EXECUTION_TIMEOUT = float(Config.get("strix_sandbox_execution_timeout")) # type: ignore[arg-type] -SANDBOX_CONNECT_TIMEOUT = float(Config.get("strix_sandbox_connect_timeout")) # type: ignore[arg-type] +SANDBOX_EXECUTION_TIMEOUT = float(Config.get("strix_sandbox_execution_timeout") or "500") +SANDBOX_CONNECT_TIMEOUT = float(Config.get("strix_sandbox_connect_timeout") or "10") async def execute_tool(tool_name: str, agent_state: Any | None = None, **kwargs: Any) -> Any: