When the AI knows how to turn this on.
By default, the official AoE2:DE AI is not able to train Cobra Cars, even if you make them available in a building such as a Stable. However, by using the Advance Genie Editor, you can trick the AI intro treating the Cobra Car as another unit, such as a Knight-line unit (as seen in this video).
My thread on how to do this:
https://forums.ageofempires.com/t/get...
Age of Empires II: Definitive Edition © Microsoft Corporation. This video was created under Microsoft's "Game Content Usage Rules" using assets from Age of Empires II: Definitive Edition, and it is not endorsed by or affiliated with Microsoft.
https://www.xbox.com/en-us/developers...