model: add const qualifier to get_thread()