Complex computer codes are widely used in science and engineering to model physical phenomena. Furthermore, it is common that they have a large number of input parameters. Global sensitivity analysis aims to identify those which have the most important impact on the output. Sobol indices are a popular tool to perform such analysis. However, their estimations require an important number of simulations and often cannot be processed under reasonable time constraint. To handle this problem, a Gaussian process regression model is built to surrogate the computer code and the Sobol indices are estimated through it. The aim of this paper is to provide a methodology to estimate the Sobol indices through a surrogate model taking into account both the estimation errors and the surrogate model errors. In particular, it allows us to derive non-asymptotic confidence intervals for the Sobol index estimations. Furthermore, we extend the suggested strategy to the case of multi-fidelity computer codes which can be run at different levels of accuracy. For such simulators, we use an extension of Gaussian process regression models for multivariate outputs.