I'm currently making a skin pack for private use and want to make it so that the AI Drivers perform driver swaps in their pitstops but through searching everywhere I can only find relevance to AI Co-Driving in the car you're driving, I'd assume you would change something in the .veh files to allow for driver swaps but I have no idea how, for all I know it might not be something rF2 is capable of yet allowing AI Cars to perform driver swaps.
This was possible with rF1 and GTR2, but was never implemented properly in rF2. Best you can do is hand control over to the computer for a time, this does not take advantage of driver files so you just get the performance of the car without any counterbalance of the abilities of a 2nd driver.