diff --git a/cmd/cognitive-worker/main.go b/cmd/cognitive-worker/main.go index e6f76e4..36b26f9 100644 --- a/cmd/cognitive-worker/main.go +++ b/cmd/cognitive-worker/main.go @@ -139,7 +139,10 @@ func main() { mediumHeaders["Authorization"] = "Bearer " + mediumAPIKey } mediumHealthProbe = health.OptionalHTTPProbeWithHeaders(mediumReadinessClient, mediumEndpoint, mediumHeaders) - mediumHealthProbe.Timeout = 2 * time.Second + // The local gateway may need several seconds to enumerate a loaded model. + // Keep this bounded, but do not classify a healthy MEDIUM provider as + // unavailable before its authenticated discovery response can arrive. + mediumHealthProbe.Timeout = 15 * time.Second } readinessProbes := []health.Probe{ health.HTTPProbe(readinessClient, strings.TrimRight(envOr("CORE_RUNTIME_URL", "http://core-runtime:8080"), "/")+"/healthz"),