The third option; it was Lord Ganesha who wrote down the Mahabharata and Vyasa who dictated it.
"Brahma said. 'I esteem thee for thy knowledge of divine mysteries, before the whole body of celebrated Munis distinguished for the sanctity of their lives. I know thou hast revealed the divine word, even from its first utterance, in the language of truth. Thou hast called thy present work a poem, wherefore it shall be a poem. There shall be no poets whose works may equal the descriptions of this poem, even, as the three other modes called Asrama are ever unequal in merit to the domestic Asrama. Let Ganesa be thought of, O Muni, for the purpose of writing the poem.'
"Sauti said, 'Brahma having thus spoken to Vyasa, retired to his own abode. Then Vyasa began to call to mind Ganesa. And Ganesa, obviator of obstacles, ready to fulfil the desires of his votaries, was no sooner thought of, than he repaired to the place where Vyasa was seated. And when he had been saluted, and was seated, Vyasa addressed him thus, 'O guide of the Ganas! be thou the writer of the Bharata which I have formed in my imagination, and which I am about to repeat."
"Ganesa, upon hearing this address, thus answered, 'I will become the writer of thy work, provided my pen do not for a moment cease writing." And Vyasa said unto that divinity, 'Wherever there be anything thou dost not comprehend, cease to continue writing.' Ganesa having signified his assent, by repeating the word Om! proceeded to write; and Vyasa began; and by way of diversion, he knit the knots of composition exceeding close; by doing which, he dictated this work according to his engagement.
(Mahabharata, Adi Parva 1.1)
The confusion probably arises from the fact that the epic is told and retold many times.