feat(backend): 스트림 타임아웃 env 화 — 첫 이벤트 300s, FabriX 조각 간 300s 기본

Gemma4 가 큐 밀리면 '안녕'에도 200초라 첫 이벤트 60s 로는 no-events 로 잘림.
STREAM_FIRST_EVENT_TIMEOUT_S / STREAM_TURN_TIMEOUT_S / AAF_FABRIX_READ_TIMEOUT_S / AAF_FABRIX_TOTAL_TIMEOUT_S 를 .env 로.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
lee-hyeon-cheol
2026-09-21 13:31:00 +09:00
co-authored by Claude Fable 5.1
parent e9e644b15b
commit aa37cef13d
5 changed files with 20 additions and 3 deletions
+4
View File
@@ -76,6 +76,10 @@ OPENCODE_DIRECTORY = _env("OPENCODE_DIRECTORY") or str((BASE_DIR / "opencode").r
# OpenCode 에 넘길 에이전트 이름 (opencode/.opencode/agent/<이름>.md)
OPENCODE_AGENT = _env("OPENCODE_AGENT", "codeassist")
# 채팅 스트림 타임아웃(초). Gemma4 가 "안녕"에도 200초 걸리는 날이 있어 첫 이벤트 300, 한 턴 600.
STREAM_TURN_TIMEOUT_S = int(_env("STREAM_TURN_TIMEOUT_S", "600"))
STREAM_FIRST_EVENT_TIMEOUT_S = int(_env("STREAM_FIRST_EVENT_TIMEOUT_S", "300"))
# 사내 LLM(FabriX) 게이트웨이 — 고객사에선 OpenCode 가 /api/ito 로 붙고 apps/gateway 가 FabriX 로 중계.
# 키 이름은 ABAP_OPENCODE 와 같음(AAF_*). 전부 비어 있으면 /api/ito/chat/completions 만 503 이고 나머진 멀쩡.
from apps.gateway.fabrix import ENV_KEYS as _FABRIX_KEYS # noqa: E402