אשר אני עושה WHAT I AM DOING in Sodom. It is not proper for Me to do this thing without his knowledge. I gave him this land and these five cities therefore are his — as it is said, (10:19) “And the territory of the Canaanites was from Sidon … as thou goest towards Sodom and Gommorah etc.” I called him Abraham, the father of a multitude of nations; should I destroy the children without informing the father who loves me? (Genesis Rabbah 49:2)
https://www.judaic.org/_files/ugd/998ef5_c897562c5775472b9b3fd7b84b73105a.pdf
המכסה אני, it is appropriate that I do not conceal from Avraham my attribute of goodness; I will inform him that if among all these wicked people in Sodom I find even a quorum of 10 righteous people, this will represent hope that eventually all or most of these people will become penitents. In that event I would bend the scales of justice in favour of the town, giving them an extension of time before destroying them. G’d teaches that He is more interested in the return of sinners to the fold than in administering retribution to them.
