Welcome to PF.
The magnet will release when the temperature of the magnet, or the magnetic material the magnet is attracted to, exceeds the curie point. The plastic case will have melted long before that will happen.
https://en.wikipedia.org/wiki/Curie_temperature
Might the presence of the magnets prevent the detector functioning? The magnetic field will be largely restricted to the magnetic path of the attachment, so it is unlikely.
Photoelectric detectors sense smoke early, while ionisation detectors sense the product of later flame.
There should be no problem if you use a photoelectric detector as they should be immune to magnetic fields.
Ionisation detectors may be effected since the path taken by a charged particle will be influenced by magnetic fields. But the balanced ionisation chambers will probably cancel any magnetic distortion. Depending on jurisdiction, a smoke detector may be prohibited if it has a replaceable battery, or employs an ionisation detector.