allow bounded medium invocation recovery
CI / test (push) Failing after 31s

This commit is contained in:
m
2026-08-30 02:10:55 +03:00
parent f7ffaee10d
commit 8caa49f429
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -71,7 +71,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
mediumTimeout := durationEnv("LOCAL_MEDIUM_PROVIDER_TIMEOUT", 60*time.Second)
mediumTimeout := durationEnv("LOCAL_MEDIUM_PROVIDER_TIMEOUT", 120*time.Second)
mediumAdapter, adapterErr := models.NewOpenAICompatibleLocalAdapterWithAPIKeyAndTimeout(strings.TrimRight(mediumURL, "/"), mediumAPIKey, nil, mediumTimeout)
if adapterErr != nil {
log.Fatal(adapterErr)
@@ -117,7 +117,7 @@ func main() {
mux.Handle("/healthz", health.Handler{Runtime: "cognitive-worker", SemanticGeneration: 1, ArchitectureGeneration: 1})
readinessClient := &http.Client{Timeout: 2 * time.Second}
cpuReadinessClient := &http.Client{Timeout: 10 * time.Second}
mediumReadinessTimeout := 60 * time.Second
mediumReadinessTimeout := 120 * time.Second
mediumReadinessClient := &http.Client{Timeout: mediumReadinessTimeout}
lifeboatURL := strings.TrimSuffix(strings.TrimRight(envOr("LOCAL_LIFEBOAT_PROVIDER_URL", "http://cognitive-lifeboat:8086/v1"), "/"), "/v1") + "/health"
fleetClient := &http.Client{Timeout: 2 * time.Second}
@@ -223,7 +223,7 @@ func refreshProviderDiscoveries(resolver bindingResolver, service discoveryServi
for name := range service.providers {
// Keep startup discovery bounded while allowing the authenticated local
// gateway enough time to enumerate a loaded MEDIUM model.
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
registration, ok := service.providers[name]
if !ok || registration.Discovery == nil {
cancel()