Toasters could do that in the fifties. Crispiness is directly related to surface temperature and you can detect that with nothing fancier than a bimetal strip and some clever engineering. If you want to use modern technology you could use an IR sensor and a two cent microcontroller.
Using AI for the task suggests that they stuck a camera in there and use image processing to badly simulate an IR sensor. Less reliable than two metal strips welded together but also way more expensive.