The AI will very rarely surrender if your fleet is of similar size to their's (that is, no more than 2 fleet levels higher). The will usually only quit after their homeworld is destroyed and they really have no way to replace their fleet. Even then, I've often had to beat the AI into submission by bombarding its last planet.
However, if you fleet up to a level they cannot compete with, particularly if you do it all at once, they will spontaneously surrender. In my most recent large comp-stomp game, I was hoovering around 500 command and had built a masterful trade network and had nearly 100k credits in reserve. After researching everything and having nothing more to really spend on, I bought out every fleet level and started spamming units. That's when the AI's surrendered. With a reload and a little tinkering, I was able to show that it was my accumulating fleet size that caused them to surrender.
So the problem is that the AI only recognizes fleet size as disadvantage worthy of surrender. It doesn't recognize that economic advantage leads to fleet advantage, and colonization advantage leads to economic advantage. As a result, when you spontaneously decide to fleet up, the AI spontaneously decides to surrender (or else is spontaneously pushed to the brink of surrender). What we need is an AI that recognizes when a long-term disadvantage is building against it, and it reacts by adjusting its behavior to try to overcome that building disadvantage. If it grows increasingly desperate and unable to break your advantage, its ultimate surrender wouldn't come out of the blue, but rather it would be the end result of several last-ditch attempts to change the course of the game.