The Kadi Camii (Mosque of the Judge) was built by Demirtaş Paşaoğlu Mehmet Bey, from the aristocrat Isfendiyaroğlu family (based in Kastamonu), which ruled the region almost independently in the 14th-15th century and often acted as real governors under the Ottomans later on.
Its ground plan is similar to a late-Roman or Byzantine basilica (with an apsis), but its orientation - to the south, where Mecca lies - proves it was from the beginning erected as a mosque. There is no dome, but a wooden ceiling. Mihrab (prayer niche) and minber (pulpit) are in marble.
In 2019, back in town, I took some more pictures.