From 0f880896fe2f5bfd0aca4605d3500d33b99cb838 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sat, 29 Aug 2026 21:47:09 +0300 Subject: [PATCH] allow bounded medium startup discovery --- cmd/cognitive-worker/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/cognitive-worker/main.go b/cmd/cognitive-worker/main.go index 0f8fce0..b9fa467 100644 --- a/cmd/cognitive-worker/main.go +++ b/cmd/cognitive-worker/main.go @@ -220,7 +220,9 @@ func durationEnv(name string, fallback time.Duration) time.Duration { func refreshProviderDiscoveries(resolver bindingResolver, service discoveryService) { for name := range service.providers { - ctx, cancel := context.WithTimeout(context.Background(), 8*time.Second) + // Keep startup discovery bounded while allowing the authenticated local + // gateway enough time to enumerate a loaded MEDIUM model. + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) registration, ok := service.providers[name] if !ok || registration.Discovery == nil { cancel()