From b175ad25947fa37b9355fdafd130e4878dc4b14e Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Tue, 28 Apr 2026 16:05:21 +0200 Subject: [PATCH] fix: increase LLM timeouts for scan corrections (90s) and DSE extraction (120s) Qwen 3.5:35b needs ~30-60s per call. Multi-call scan was timing out. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend-compliance/compliance/api/agent_scan_routes.py | 2 +- backend-compliance/compliance/services/dse_service_extractor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend-compliance/compliance/api/agent_scan_routes.py b/backend-compliance/compliance/api/agent_scan_routes.py index c308974..6d41386 100644 --- a/backend-compliance/compliance/api/agent_scan_routes.py +++ b/backend-compliance/compliance/api/agent_scan_routes.py @@ -233,7 +233,7 @@ async def _add_corrections(findings: list[ScanFinding], dse_text: str) -> None: if finding.severity in ("HIGH", "MEDIUM") and "MISSING" in finding.code: service_name = finding.code.replace("DSE-MISSING-", "").replace("_", " ").title() try: - async with httpx.AsyncClient(timeout=30.0) as client: + async with httpx.AsyncClient(timeout=90.0) as client: resp = await client.post(f"{SDK_URL}/sdk/v1/llm/chat", headers=SDK_HEADERS, json={ "messages": [ {"role": "system", "content": ( diff --git a/backend-compliance/compliance/services/dse_service_extractor.py b/backend-compliance/compliance/services/dse_service_extractor.py index ab2917e..e50e6d7 100644 --- a/backend-compliance/compliance/services/dse_service_extractor.py +++ b/backend-compliance/compliance/services/dse_service_extractor.py @@ -40,7 +40,7 @@ async def extract_dse_services(dse_text: str) -> list[dict]: "\"country\": \"USA\", \"legal_basis\": \"Einwilligung\"}]" ) try: - async with httpx.AsyncClient(timeout=60.0) as client: + async with httpx.AsyncClient(timeout=120.0) as client: resp = await client.post(f"{SDK_URL}/sdk/v1/llm/chat", headers=SDK_HEADERS, json={ "messages": [ {"role": "system", "content": prompt},