From af9da3c912e5bf8a2799f8b1263df3a842a07f8b Mon Sep 17 00:00:00 2001 From: kami Date: Wed, 1 Jul 2026 00:17:15 +0400 Subject: [PATCH] fix(inference): raise llama HTTP request timeout 600s -> 1800s Align the provider's HTTP client timeout with the orchestrator per-stage timeout (1_800_000ms). A slow local reasoning model with a large prompt and a multi-thousand-token reasoning budget can exceed 10min on a single call; the old 600s HTTP timeout failed the inference before the stage timeout applied, exhausting retries on timeouts alone. --- .../inference/llama/cpp/LlamaCppInferenceProvider.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infrastructure/inference/llama_cpp/src/main/kotlin/com/correx/infrastructure/inference/llama/cpp/LlamaCppInferenceProvider.kt b/infrastructure/inference/llama_cpp/src/main/kotlin/com/correx/infrastructure/inference/llama/cpp/LlamaCppInferenceProvider.kt index 68d40cac..6ea2441a 100644 --- a/infrastructure/inference/llama_cpp/src/main/kotlin/com/correx/infrastructure/inference/llama/cpp/LlamaCppInferenceProvider.kt +++ b/infrastructure/inference/llama_cpp/src/main/kotlin/com/correx/infrastructure/inference/llama/cpp/LlamaCppInferenceProvider.kt @@ -31,7 +31,10 @@ import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import org.slf4j.LoggerFactory -private const val DEFAULT_REQUEST_TIMEOUT_MS = 600_000L +// Aligned with the orchestrator's per-stage timeout (1_800_000ms). A slow local reasoning model +// (large prompt + a multi-thousand-token reasoning budget) can take >10min for a single call; +// a shorter HTTP timeout here fails the call before the stage timeout ever applies. +private const val DEFAULT_REQUEST_TIMEOUT_MS = 1_800_000L private fun defaultHttpClient(): HttpClient = HttpClient(CIO) { install(ContentNegotiation) {