In this article, we propose an adaptive-to-model test for conditional independence through groupwise dimension reduction developed in sufficient dimension reduction field. The test statistic under the null hypothesis is asymptotically normally distributed. Although it is also based on nonparametric estimation like any local smoothing tests for conditional independence, its behavior is similar to existing local smoothing tests with only the number of covariates under the null hypothesis. Furthermore, it can detect local alternatives distinct from the null at the rate that is also only related to the number of covariates under the null hypothesis. Therefore, the curse of dimensionality is largely alleviated. To achieve the above goal, we also suggest a groupwise least squares estimation for the groupwise central subspace in sufficient dimension reduction. It is of its own importance in estimation theory though it is as a by-product for the model adaptation of test statistic described herewith. Numerical studies and analyses for two real data sets are then conducted to examine the finite sample performance of the proposed test.