diff --git a/internal/api/handlers/handlers.go b/internal/api/handlers/handlers.go index 3f779431..8fe28ad7 100644 --- a/internal/api/handlers/handlers.go +++ b/internal/api/handlers/handlers.go @@ -109,6 +109,7 @@ func (h *BaseAPIHandler) GetClient(modelName string, isGenerateContent ...bool) } if len(clients) == 0 { + h.Mutex.Unlock() return nil, &interfaces.ErrorMessage{StatusCode: 500, Error: fmt.Errorf("no clients available")} }