I'll get on my "Allied Victory" soap box and say that the AI would be best to stay allied with you.
If the AI thinks "this guy is to powerful, I should attach him now to ensure my own victory," to me this implies that there is a limit to the number of people who can win, which is what I've been pushing for. See my "Allied Victory" post.
Currently, every single player can win (not a single loser), so there is no logical reason for the AI to "think" about betraying you. Afterall, you can both win.
This is a good idea, and would make most logical sense if there were a limit on the number of possible winners in a game.