Reactions are part of5E so i guess it will be in the game.
And work like this: on the enemies turn it uses fireball.
Your character has the option of using a reaction or similar like luck.
If I wanted a reaction for my mage, I would just cast Contingency.
What you are describing is not related to this mechanism. You are offering a pre-planned mechanism, something BG2 already had aplenty.
What I describe is a greater depth to the spellcasting, a mind-game in real time between two mages.
Consider how much potential this would have if the a.i. was immensely clever.
The situation could be reversed, the a.i. might even take a guess of what I had cast among the Evocation spells and counter with a Protection from Elements spell.
This is a mind-game mechanism, we should have both this, as well as the pre-planned mechanisms like Contingency and Reactions.