In the Adi Parva of the Mahabharata, Vaishampayana describes to Janamejeya the lineage of the gods, Asuras, and other beings, and in particular he says this about Sukracharya:
The learned Sukra is Bhrigu's son. And the learned Sukra becoming a planet and engaged according to the command of the Self-existent in pouring and withholding rain, and in dispensing and remitting calamities, traverses, for sustaining the lives of all the creatures in the three worlds, through the skies. And the learned Sukra, of great intelligence and wisdom, of rigid vows, leading the life of a Brahmacharin, divided himself in twain [two] by power of asceticism, and became the spiritual guide of both the Daityas [Asuras] and the gods.
Sukracharya is the guru of the Asuras and god of the planet Venus. But my question is, why does Vaishampayana say that Sukracharya "divided himself in [two]" and became the guru "of both the [Asuras] and the gods"? Isn't Brihaspati the guru of the gods?
This isn't the only indication that Sukracharya was on the side of the gods at some point. Multiple verses of the Vedas seem to indicate that Sukracharya was involved in the creation of Indra's Vajra or lightning-bolt weapon; here is what Rig Veda Book 1 Hymn 51 says:
The might which Uśanā [Sukracharya] hath formed for thee with might rends in its greatness and with strength both worlds apart.... When Indra hath rejoiced with Kāvya Uśanā [Sukracharya], he mounts his steeds who swerve wider and wider yet.
And here is what Rig Veda Book 1 Hymn 121 says:
Mount Indra, lover of the men thou guardest, the well-yoked horses of the wind, best bearers. The bolt which Kāvya Uśanā [Sukracharya] erst gave thee, strong, gladdening, Vṛtra-slaying, hath he fashioned.
So did Sukracharya ever serve as guru of the gods? As I discuss in this answer, there was an occasion when Tvashta's son Trisiras temporarily served as guru of the gods because Brihaspati had abandoned them. But are there any other scriptures which say that Sukracharya played a similar role? And what's the story of him splitting in two?