It uses the default setup shipped with the car unless you click on AI name and then the assign setup button.
There is a setting in player.json that is supposed to force the AI to use whatever default setup you have chosen for a specific track. I did this, but I found that while the default for me loads medium tires (Oreca @ LeMans), the AI uses hards. So I'm not sure the AI uses all the settings you set as default. I saw the difference by using LogAnalyzer after the race and looking at tire usage. I'm suspicious of the fuel load being used by all AI , also.
Yes, giving them a setup like that probably works, but they still take full fuel and the hardest available compound.