A polynucleotide encoding a biosensor polypeptide comprising a modified circularly-permuted thermostable luciferase and a linker linking the C-terminal portion of the thermostable luciferase to the N-terminal portion of the thermostable luciferase. The modified circularly-permuted thermostable luciferase is modified relative to an unmodified circularly-permuted thermostable luciferase. The linker contains a sensor region capable of interacting with a target molecule in a cell. The modified circularly-permuted thermostable luciferase has an enhanced response after interaction of the biosensor with the target molecule relative to the unmodified circularly-permuted thermostable luciferase in the presence of the target molecule. Alternatively, the modified circularly-permuted thermostable luciferase has an enhanced response after interaction of the biosensor with the target molecule relative to the modified circularly-permuted thermostable luciferase in the absence of the target molecule.