Make AI to use a dual mode NEW unit (war elephant/elephant archer) similar to Ratha usable by AI to switch melee and ranged modes

Hi
I have created a new unit Airavatha - which is a dual mode unit - war elephant and elephant archer and can be switched easily similar to Ratha unit.
However, AI doesn’t use the switch mode and only in manual players can use it as of now.
How to make the AI to tell this unit has dual modes (melee/ranged) and use it accordingly similar to Ratha unit.