{"repo":"NousResearch/hermes-agent","public_id":"2107","display_label":"Auxiliary and vision LLM timeout configuration issues","summary":"These issues and PRs concern default HTTP timeouts (often 30s) being too short for auxiliary LLM calls, vision analysis, and context compression when using slow or local model endpoints. The work spans bug reports, fixes, and feature requests for making these timeouts configurable and auto-adjusted for local inference.","subsystem":"agent","counts":{"members":17,"open_issues":2,"open_issues_distinct":2,"open_prs":1,"closed_issues":3,"merged_prs":2,"attempt_prs":10},"landed_fix":{"status":"merged_to_main","basis":"structural","pr":2480},"resolution":{"state":"unresolved","by":null},"freshness":{"state":"stale","last_verified_at":"2026-03-28T21:35:28+00:00","is_stale":true},"grouping":{"backbone":"STRUCTURAL_PARTIAL","link_density":0.10147058823529409},"fix_edges":[{"issue_number":2107,"pr_number":2480,"tier":"verified","basis":"superseded_ref","confidence":0.9,"recoverable_from_timeline":false},{"issue_number":3404,"pr_number":3597,"tier":"verified","basis":"superseded_ref","confidence":0.9,"recoverable_from_timeline":false}],"members":[{"kind":"issue","number":2107,"title":"[Bug]: `vision_analyze` on a slow enough local model will timeout due to default 30s timout","url":null,"state":"closed"},{"kind":"issue","number":3404,"title":"[Feature]: Configurable timeouts for auxiliary call_llm and context compression","url":null,"state":"closed"},{"kind":"issue","number":8120,"title":"[Bug]: vision_analyze frequently times out when analyzing local images in WSL2","url":null,"state":"open"},{"kind":"issue","number":21566,"title":"Auxiliary LLM calls (session_search, skills_hub, etc.) use short 30s default timeout with no local-endpoint detection — causes retry storms on slow local inference","url":null,"state":"open"},{"kind":"issue","number":35517,"title":"[Bug]: Auxiliary client HTTP timeout defaults to 30s, causing compression to fail with slow local LLMs","url":null,"state":"closed"},{"kind":"pr","number":2126,"title":"fix(vision): make timeout configurable via HERMES_VISION_TIMEOUT_SECONDS","url":null,"state":"closed","close_reason":{"refs":[{"kind":"pr","value":"#2306","number":2306}],"category":"duplicate_of","implication":"duplicate"},"merged":false},{"kind":"pr","number":2257,"title":"fix(vision): increase LLM timeout for vision_analyze to support local models","url":null,"state":"closed","close_reason":{"category":"uncategorized","implication":"needs_llm"},"merged":false},{"kind":"pr","number":2306,"title":"fix: make vision_analyze timeout configurable","url":null,"state":"closed","close_reason":{"refs":[{"kind":"pr","value":"#2480","number":2480}],"category":"merged_via","implication":"superseded"},"merged":false},{"kind":"pr","number":2480,"title":"fix: make vision_analyze timeout configurable via config.yaml (salvage #2306)","url":null,"state":"merged","close_reason":{"category":"merged","implication":"superseded"},"merged":true,"is_fix_pr":true,"fix_tier":"verified","files_changed":["hermes_cli/config.py","tools/vision_tools.py","website/docs/user-guide/configuration.md"],"fix_hunks":[{"file":"hermes_cli/config.py","hunks":["@@ -182,6 +182,7 @@ def ensure_hermes_home():\n             \"model\": \"\",           # e.g. \"google/gemini-2.5-flash\", \"gpt-4o\"\n             \"base_url\": \"\",        # direct OpenAI-compatible endpoint (takes precedence over provider)\n             \"api_key\": \"\",         # API key for base_url (falls back to OPENAI_API_KEY)\n+            \"timeout\": 30,         # seconds — increase for slow local vision models\n         },\n         \"web_extract\": {\n             \"provider\": \"auto\","]},{"file":"tools/vision_tools.py","hunks":["@@ -298,12 +298,23 @@ async def vision_analyze_tool(\n         \n         logger.info(\"Processing image with vision model...\")\n         \n-        # Call the vision API via centralized router\n+        # Call the vision API via centralized router.\n+        # Read timeout from config.yaml (auxiliary.vision.timeout), default 30s.\n+        vision_timeout = 30.0\n+        try:\n+            from hermes_cli.config import load_config\n+            _cfg = load_config()\n+            _vt = _cfg.get(\"auxiliary\", {}).get(\"vision\", {}).get(\"timeout\")\n+            if _vt is not None:\n+                vision_timeout = float(_vt)\n+        except Exception:\n+            pass\n         call_kwargs = {\n             \"task\": \"vision\",\n             \"messages\": messages,\n             \"temperature\": 0.1,\n             \"max_tokens\": 2000,\n+            \"timeout\": vision_timeout,\n         }\n         if model:\n             call_kwargs[\"model\"] = model"]},{"file":"website/docs/user-guide/configuration.md","hunks":["@@ -907,6 +907,7 @@ auxiliary:\n     model: \"\"                  # e.g. \"openai/gpt-4o\", \"google/gemini-2.5-flash\"\n     base_url: \"\"               # Custom OpenAI-compatible endpoint (overrides provider)\n     api_key: \"\"                # API key for base_url (falls back to OPENAI_API_KEY)\n+    timeout: 30                # seconds — increase for slow local vision models\n \n   # Web page summarization + browser page text extraction\n   web_extract:\n"]}]},{"kind":"pr","number":3406,"title":"feat(agent): configurable timeouts for auxiliary LLM calls and context compression","url":null,"state":"closed","close_reason":{"refs":[{"kind":"pr","value":"#3597","number":3597}],"category":"merged_via","implication":"superseded"},"merged":false},{"kind":"pr","number":3597,"title":"feat(agent): configurable timeouts for auxiliary LLM calls via config.yaml (salvage #3406)","url":null,"state":"merged","close_reason":{"category":"merged","implication":"superseded"},"merged":true,"is_fix_pr":true,"fix_tier":"verified","files_changed":["agent/auxiliary_client.py","agent/context_compressor.py","agent/title_generator.py","hermes_cli/config.py"],"fix_hunks":[{"file":"agent/auxiliary_client.py","hunks":["@@ -1458,6 +1458,29 @@ def _resolve_task_provider_model(\n     return \"auto\", resolved_model, None, None\n \n \n+_DEFAULT_AUX_TIMEOUT = 30.0\n+\n+\n+def _get_task_timeout(task: str, default: float = _DEFAULT_AUX_TIMEOUT) -> float:\n+    \"\"\"Read timeout from auxiliary.{task}.timeout in config, falling back to *default*.\"\"\"\n+    if not task:\n+        return default\n+    try:\n+        from hermes_cli.config import load_config\n+        config = load_config()\n+    except ImportError:\n+        return default\n+    aux = config.get(\"auxiliary\", {}) if isinstance(config, dict) else {}\n+    task_config = aux.get(task, {}) if isinstance(aux, dict) else {}\n+    raw = task_config.get(\"timeout\")\n+    if raw is not None:\n+        try:\n+            return float(raw)\n+        except (ValueError, TypeError):\n+            pass\n+    return default\n+\n+\n def _build_call_kwargs(\n     provider: str,\n     model: str,","@@ -1515,7 +1538,7 @@ def call_llm(\n     temperature: float = None,\n     max_tokens: int = None,\n     tools: list = None,\n-    timeout: float = 30.0,\n+    timeout: float = None,\n     extra_body: dict = None,\n ) -> Any:\n     \"\"\"Centralized synchronous LLM call.","@@ -1533,7 +1556,7 @@ def call_llm(\n         temperature: Sampling temperature (None = provider default).\n         max_tokens: Max output tokens (handles max_tokens vs max_completion_tokens).\n         tools: Tool definitions (for function calling).\n-        timeout: Request timeout in seconds.\n+        timeout: Request timeout in seconds (None = read from auxiliary.{task}.timeout config).\n         extra_body: Additional request body fields.\n \n     Returns:","@@ -1598,10 +1621,12 @@ def call_llm(\n                 f\"No LLM provider configured for task={task} provider={resolved_provider}. \"\n                 f\"Run: hermes setup\")\n \n+    effective_timeout = timeout if timeout is not None else _get_task_timeout(task)\n+\n     kwargs = _build_call_kwargs(\n         resolved_provider, final_model, messages,\n         temperature=temperature, max_tokens=[redacted:secret-assignment]\n-        tools=tools, timeout=timeout, extra_body=extra_body,\n+        tools=tools, timeout=effective_timeout, extra_body=extra_body,\n         base_url=resolved_base_url)\n \n     # Handle max_tokens vs max_completion_tokens retry","@@ -1683,7 +1708,7 @@ async def async_call_llm(\n     temperature: float = None,\n     max_tokens: int = None,\n     tools: list = None,\n-    timeout: float = 30.0,\n+    timeout: float = None,\n     extra_body: dict = None,\n ) -> Any:\n     \"\"\"Centralized asynchronous LLM call.","@@ -1744,10 +1769,12 @@ async def async_call_llm(\n                 f\"No LLM provider configured for task={task} provider={resolved_provider}. \"\n                 f\"Run: hermes setup\")\n \n+    effective_timeout = timeout if timeout is not None else _get_task_timeout(task)\n+\n     kwargs = _build_call_kwargs(\n         resolved_provider, final_model, messages,\n         temperature=temperature, max_tokens=[redacted:secret-assignment]\n-        tools=tools, timeout=timeout, extra_body=extra_body,\n+        tools=tools, timeout=effective_timeout, extra_body=extra_body,\n         base_url=resolved_base_url)\n \n     try:"]},{"file":"agent/context_compressor.py","hunks":["@@ -347,7 +347,7 @@ def _generate_summary(self, turns_to_summarize: List[Dict[str, Any]]) -> Optiona\n                 \"messages\": [{\"role\": \"user\", \"content\": prompt}],\n                 \"temperature\": 0.3,\n                 \"max_tokens\": summary_budget * 2,\n-                \"timeout\": 45.0,\n+                # timeout resolved from auxiliary.compression.timeout config by call_llm\n             }\n             if self.summary_model:\n                 call_kwargs[\"model\"] = self.summary_model"]},{"file":"agent/title_generator.py","hunks":["@@ -19,7 +19,7 @@\n )\n \n \n-def generate_title(user_message: str, assistant_response: str, timeout: float = 15.0) -> Optional[str]:\n+def generate_title(user_message: str, assistant_response: str, timeout: float = 30.0) -> Optional[str]:\n     \"\"\"Generate a session title from the first exchange.\n \n     Uses the auxiliary LLM client (cheapest/fastest available model)."]},{"file":"hermes_cli/config.py","hunks":["@@ -227,42 +227,49 @@ def ensure_hermes_home():\n             \"model\": \"\",\n             \"base_url\": \"\",\n             \"api_key\": \"\",\n+            \"timeout\": 30,         # seconds — increase for slow local models\n         },\n         \"compression\": {\n             \"provider\": \"auto\",\n             \"model\": \"\",\n             \"base_url\": \"\",\n             \"api_key\": \"\",\n+            \"timeout\": 120,        # seconds — compression summarises large contexts; increase for local models\n         },\n         \"session_search\": {\n             \"provider\": \"auto\",\n             \"model\": \"\",\n             \"base_url\": \"\",\n             \"api_key\": \"\",\n+            \"timeout\": 30,\n         },\n         \"skills_hub\": {\n             \"provider\": \"auto\",\n             \"model\": \"\",\n             \"base_url\": \"\",\n             \"api_key\": \"\",\n+            \"timeout\": 30,\n         },\n         \"approval\": {\n             \"provider\": \"auto\",\n             \"model\": \"\",           # fast/cheap model recommended (e.g. gemini-flash, haiku)\n             \"base_url\": \"\",\n             \"api_key\": \"\",\n+            \"timeout\": 30,\n         },\n         \"mcp\": {\n             \"provider\": \"auto\",\n             \"model\": \"\",\n             \"base_url\": \"\",\n             \"api_key\": \"\",\n+            \"timeout\": 30,\n         },\n         \"flush_memories\": {\n             \"provider\": \"auto\",\n             \"model\": \"\",\n             \"base_url\": \"\",\n             \"api_key\": \"\",\n+            \"timeout\": 30,\n         },\n     },\n     \n"]}]},{"kind":"pr","number":8168,"title":"fix: prevent vision_analyze timeouts on larger local images","url":null,"state":"closed","close_reason":{"category":"implemented_elsewhere","implication":"superseded"},"merged":false},{"kind":"pr","number":21569,"title":"fix(agent): auto-bump auxiliary LLM timeout for local endpoints","url":null,"state":"open","close_reason":{"refs":[{"kind":"pr","value":"#21575","number":21575},{"kind":"pr","value":"#21566","number":21566}],"category":"uncategorized","implication":"needs_llm"},"merged":false},{"kind":"pr","number":21575,"title":"fix(auxiliary): bump aux-call timeout for local endpoints (#21566)","url":null,"state":"closed","close_reason":{"category":"stale_abandoned","implication":"active"},"merged":false},{"kind":"pr","number":26483,"title":"fix(agent): forward fallback_providers[].extra_body during fallback activation (#26460)","url":null,"state":"closed","close_reason":{"category":"stale_abandoned","implication":"active"},"merged":false},{"kind":"pr","number":36258,"title":"fix(agent): add 300s timeout to all auxiliary OpenAI clients (#35517)","url":null,"state":"closed","close_reason":{"refs":[{"kind":"commit","value":"370a489fb4adb7268f6510439e25e8213bddb624","number":0}],"category":"implemented_elsewhere","implication":"superseded"},"merged":false},{"kind":"pr","number":129734,"title":"fix(vision): bound the aux vision payload before the request, not after a provider rejection","url":null,"state":"closed","close_reason":{"refs":[{"kind":"commit","value":"fe52e6272cac","number":0}],"category":"implemented_elsewhere","implication":"superseded"},"merged":false}],"trust":{"default_tier":"verified","includes_suggested":false}}