If it really needs AI, something this basic should be able to use a tiny AI model that can run locally. Google are working on building small models into Chrome for example (https://developer.chrome.com/docs/ai/built-in). It really doesn't need a huge model.
Several mobile apps bundle an AI model with them. Samsung phones do a bunch of AI things on-device, including object and face recognition in the Gallery app for photos. There's no reason an extension couldn't do that.