semblance-dev/backend/app/services
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
..
ai_moderator_service.py changed permissions 2025-12-19 19:26:16 +00:00
ai_persona_service.py Fix audience_brief and research_objective dropped in Stage 2 persona generation 2026-02-11 08:40:17 -06:00
ai_runner_service.py changed permissions 2025-12-19 19:26:16 +00:00
autonomous_conversation_controller.py Fix AI loop hanging: add asyncio.wait_for timeouts on LLM calls 2026-03-23 19:17:36 +00:00
bulk_persona_export_service.py Migrate task result delivery from WebSocket to HTTP polling 2026-03-23 16:46:58 +00:00
conversation_context_service.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
conversation_decision_service.py Fix AI loop hanging: add asyncio.wait_for timeouts on LLM calls 2026-03-23 19:17:36 +00:00
conversation_state_manager.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
customer_data_service.py changed permissions 2025-12-19 19:26:16 +00:00
focus_group_response_service.py Add model alias for legacy gpt-5 database entries 2026-02-11 12:06:10 -06:00
focus_group_service.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
focus_group_summary_service.py changed permissions 2025-12-19 19:26:16 +00:00
image_description_service.py Allow document uploads (PDF, DOCX, TXT, etc.) as focus group assets 2026-03-23 17:08:30 +00:00
key_theme_service.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
llm_service.py Fix Gemini LLM AssertionError: force httpx transport over aiohttp 2026-03-23 13:05:27 +00:00
msal_service.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
persona_export_service.py changed permissions 2025-12-19 19:26:16 +00:00
persona_modification_service.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
task_manager.py Migrate task result delivery from WebSocket to HTTP polling 2026-03-23 16:46:58 +00:00