* server : clean up built-in template detection * fix compilation * add chat template test * fix condition