If you destroy a government in your own settlement, with which you then gift it to an AI faction, the AI will be forced to build a new government eventually due to the fact that no government is automatically built for them in a situation like this. So far, in my own personal experience, the AI always goes for the cheapest government: type 4.

But I don't think they get puppet rulers...