The problem is obviously that if they would use their immense gold stacks to do that, you would never again be able to win diplomacy ever through peaceful means.
I have noticed this too, just won a diplo game on emperor with every CS allied and a Venice who has 25,000g in his bank. He's friends with me and all but that shouldn't stop him from trying to win, or at least not lose so bad.
note: if every AI did that then it would become truly difficult to get the gold for a diplo victory, and you would have to rely on things like treaty organization/gunboat diplomacy more (and coming in 1st on repeated rounds)
What is your military rating? In my games the AI keeps on buying city states over and over (especially the usual suspects like Alexander and Elizabeth). In one game though where I was pretty high on military and almost every nation got afraid after I built a nuclear missile and they suddenly stopped bullying or buying all those city states.they still refuse to ally a single city state ( I am allied with everyone) and I am about to become world leader. This is broken. They AI needs to compete for City states more vigorously considering how much more important they have become.
The problem is obviously that if they would use their immense gold stacks to do that, you would never again be able to win diplomacy ever through peaceful means.
I don't think anybody wants Civs to use their entire treasury reserve to win over a City State just to prevent the player from winning
I don't think anybody wants Civs to use their entire treasury reserve to win over a City State just to prevent the player from winning, but they should at least put up a reasonable fight for them, especially City States which actually have value to them as allies due to their bonuses or close proximity.
The AI is not aware of any impending victory. The closest it comes to that is Diplo Balance, but that's runaway hate, and you don't have to runaway in score to win any of the victory conditions besides conquest. And, that only affects diplomacy, not AI's use of gold.
This was originally scripted to prevent all AIs from auto-DoW-ing you when you are nearing any VC, as a competitor aware that you are about to win the game would do. It does make the game less stupid in the end from a flavor perspective (especially from a science/culture perspective). I think they should take a middle position, so that if you have good diplo, the AI would not be mad at you for nearing a victory condition, but if you have medium/bad diplo, that AI should actively prevent you from winning when you start getting very close (e.g. 2 spaceship parts or 2 influencials away or 2 capitals away, or 10 turns before UN vote and you have enough or nearly enough delegates).
they still refuse to ally a single city state ( I am allied with everyone) and I am about to become world leader. This is broken. They AI needs to compete for City states more vigorously considering how much more important they have become.
I don't know how they coded it but I'd try a higher difficulty level. At higher levels gold is dearer for everyone. I've been playing emperor and there was one game with an AI with 10k gold but out of @12 games that was unusual.
How they compete with CS (on all levels) I'm not sure. I used to play a mod where the AI was vicious in competing with CS so compared to BNW they are tamer but I haven't played vanilla since launch so I don't know how that compares.
That said there are a lot of variables such as map and lie among others that affect AI behavior.