Another possibility is that, once AI exceeds human performance in all economically useful activities, including high-level planning, governance, law enforcement, and military actions, it discovers that the benefits of keeping humans around aren't worth the costs and risks.
Bad: the above but also their power and influence grows so much and governments are so ineffective (or corrupt) against them that the tech companies also become de facto governments and people rely on them to survive. Also they destroy earth even faster with nobody left to stop them. The full fat cyberpunk dystopia.
Bad: the above but with lots more fascism and war. Too many people seem to want this.
Bad: regulate AI to such an extent as to cede all growth and technological leadership to whoever doesn't
...