What spells are not cast? Custom ones? More details please.
Does the computer player's hero has the ability learned? This is a must...
Despite what you're saying. You have to either set the ability level in the map editor in the hero properties, or set abilities using triggers, or use an AI script.
Last but not least. Are you sure that the hero has enough mana to cast the spell?