semblance-dev/backend/app
Vadym Samoilenko 7e72d07329 Fix AI loop hanging: add asyncio.wait_for timeouts on LLM calls
The autonomous conversation loop could hang indefinitely because
self.response_timeout=30 was defined but never used in wait_for().

- autonomous_conversation_controller: wrap generate_persona_response()
  with asyncio.wait_for(timeout=120s); 30s was too short for production
  LLMs, raised to 120s; TimeoutError returns an error dict so the loop
  can continue or count toward consecutive_silence limit
- conversation_decision_service: add asyncio.wait_for(timeout=60s)
  around LLMService.generate_content() for the decision call; add
  asyncio import and explicit TimeoutError handling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 19:17:36 +00:00
..
auth Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
models Fix focus group create: 500 on update + 400 on autosave 2026-03-23 15:20:40 +00:00
routes Fix AI mode: race condition, split-brain UI, and stuck local state 2026-03-23 19:02:15 +00:00
services Fix AI loop hanging: add asyncio.wait_for timeouts on LLM calls 2026-03-23 19:17:36 +00:00
utils Fix make_serializable import — move to utils/__init__.py (was shadowed by utils/ package) 2026-03-20 13:33:11 +00:00
.DS_Store changed permissions 2025-12-19 19:26:16 +00:00
__init__.py Fix AI autonomous mode: cross-loop WebSocket emit + polling fallback 2026-03-23 18:22:24 +00:00
db.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
extensions.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_debug_tap.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_manager.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
websocket_manager_async.py Fix AI autonomous mode: cross-loop WebSocket emit + polling fallback 2026-03-23 18:22:24 +00:00