The mage is a 9th-level spellcaster. Its spellcasting ability is Intelligence (spell save DC 14, +6 to hit with spell attacks). The mage has the following wizard spells prepared:
Cantrips
fire bolt
light
mage hand
prestidigitation
Level 1 (4 slots)
detect magic
mage armor
magic missile
shield
Level 2 (3 slots)
misty step
suggestion
Level 3 (3 slots)
counterspell
fireball
fly
Level 4 (3 slots)
greater invisibility
ice storm
Level 5 (1 slots)
cone of cold