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) {