Add OnDemandStartTimeout configuration and update OpenAIProxy to use it

This commit is contained in:
2025-08-20 14:25:43 +02:00
parent 496ab3aa5d
commit ddb54763f6
2 changed files with 12 additions and 3 deletions

View File

@@ -583,7 +583,7 @@ func (h *Handler) OpenAIProxy() http.HandlerFunc {
}
// Wait for the instance to become healthy before proceeding
if err := inst.WaitForHealthy(120); err != nil { // 2 minutes timeout
if err := inst.WaitForHealthy(h.cfg.Instances.OnDemandStartTimeout); err != nil { // 2 minutes timeout
http.Error(w, "Instance failed to become healthy: "+err.Error(), http.StatusServiceUnavailable)
return
}