Every nuclear power holds the spirit Nuclear Restraint: its nuclear strikes can only be prepared and launched against another nuclear power. The AI will not plan them otherwise.
A nuclear power can Abandon Nuclear Restraint by decision. World tension rises sharply, and every major power outside its alliance led by a player gets a Denuclearise war goal against it (the others can claim one by decision, Demand the Denuclearisation of ...). The AI's majors get theirs only once it strikes a country without the bomb.
If it capitulates it loses its arsenal and cannot build another for ten years. After two years at peace it can Return to Nuclear Restraint.