In verse six of the same chapter it is ‘God’ that ‘operates’ or empowers (Θεος ο ενεργων).
and there are varieties of activities, but it is the same God who empowers them all in everyone. (1 Cor 12:4, ESV)
In verse 13, it is the ‘Spirit’ that ‘operates’ ενεργει. The Spirit here appears as a creative power. In extension of the Spirit's role, as distinct from the Father, it is also ‘he’ the Spirit (πνευμα) who apportions to each one individually as he wills (πνευμα διαιρουν ιδια εκαστω καθως βουλεται). It would require additional identification of the Father with an additional word, in order to transition from the Spirit (πνευμα) to God (Θεος), otherwise, there is a sudden break in thought without any reasonable trigger. It is more natural to continue in the verse with 'he' being the Spirit.
Charles Hodge makes a clear argument in favor of assuming ‘he’ is the Spirit:
But all these. &c, i. e. notwithstanding the diversity of these gifts they have a common origin. They are wrought by the same Spirit. What therefore in v. 6 is referred to the efficiency of God, is here referred to the efficiency of the Spirit. This is in accordance with constant scriptural usage. The same effect is sometimes attributed to one, and sometimes to another of the persons of the Holy Trinity. This supposes that, being the same in substance (or essence) in which divines power inheres, they cooperate in the production of these effects. Whatever the Father does, he does through the Spirit. The Holy Ghost not only produces these gifts in the minds of men, but he distributes them severally (ἰδίᾳ) to every man as he will, i. e. not according to the merits or wishes of men, but according to his own will. This passage clearly proves that the Holy Spirit is a person. Will is here attributed to him, which is one of the distinctive attributes of a person. Both the divinity and personality of the Holy Ghost are therefore involved in the nature of the work here ascribed to him. (AN EXPOSITION OF THE FIRST EPISTLE TO THE CORINTHIANS BY CHARLES HODGE)