It has always been the case that the AI gives peace deals that take into account (1) your military strength vs their military strength and (2) how much losses you have inflicted on them during the war. Any time you destroy their entire army, they will always offer you an amazing peace deal. This is even the case if they are more advanced than you and might be able to pump out more higher level troops in the near future. They always look at their situation as it is at that moment. I just was playing and killed off all of Poland's army with my musketmen and field cannons. Then she suddenly upgraded to cavalry, and produced one of them. At that point, it would have been pretty hard for me to take more cities without her being able to pump out some more cavalry and kill off some of my units. However, she still offered me a peace deal where she gave me 5 of her 9 cities. Yes, she could have produced another army that would likely be stronger than mine, but I had just killed off her entire army. This is how it has always been as far as I can tell, but they might have tweaked it recently to make the deals a little better I don't know.