In this work, we offer a novel perspective on detecting out-of-distribution (OOD) samples and propose a sample-aware model selection algorithm by exploring the model zoo.Our algorithm automatically selects pre-trained models for each test input, effectively identifying OOD samples and classifying them. If no model is selected, the test input is classified as an in-distribution (ID) sample.We provide theoretical analysis that demonstrates our approach maintains the true positive rate of ID samples, and accurately identifies OOD samples with a high probability, given a sufficiently large model zoo. We conducted extensive experiments, which showed that our method leverages the complementarity among individual model detectors to consistently improve the effectiveness of OOD sample identification. Compared to baseline methods, our approach improved the relative performance by 65.40\% and 26.96\% on the CIFAR10 and ImageNet benchmarks, respectively.