fix(gateway): enable stream for all LLM calls — router always streams SSE
Build & Deploy (Nix) / build-and-deploy (proxy) (push) Successful in 3m36s
Build & Deploy (Nix) / build-and-deploy (backend) (push) Successful in 4m9s
Build & Deploy (Nix) / build-and-deploy (discord-gateway) (push) Successful in 11m29s
Build & Deploy (Nix) / build-and-deploy (proxy) (push) Successful in 3m36s
Build & Deploy (Nix) / build-and-deploy (backend) (push) Successful in 4m9s
Build & Deploy (Nix) / build-and-deploy (discord-gateway) (push) Successful in 11m29s
Audit lanjutan: 6x 'LLM API request failed: Request was aborted' per jam. Root cause: 9router/omniroute SELALU balas SSE (data: chunks) walau request tanpa stream:true — SDK OpenAI non-stream menunggu FULL body sebelum parse, jadi batch moderasi besar yang upstream-nya lambat kena timeout 30-60s dan di-abort. llmClient sudah punya agregasi streaming (chunks → ChatCompletion). Fix: stream:true di llmCaller (moderasi batch/individual), llmVision, cultureLearner, userProfileLearner. Verified: SDK stream test 806ms vs sebelumnya abort. Caller lain (recovery worker dll) lewat llmCaller sama.
This commit is contained in:
@@ -116,6 +116,7 @@ atau konten SARA, itu akan SANGAT tidak sesuai dengan karakternya dan patut dicu
|
||||
max_tokens: 2000,
|
||||
temperature: 0.7, // Higher temp for summarization
|
||||
retries: 2,
|
||||
stream: true, // router always streams SSE; non-stream waits for full body and times out
|
||||
});
|
||||
|
||||
if (!completion) throw new Error("Empty response from LLM");
|
||||
|
||||
Reference in New Issue
Block a user