Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Extract duplicated thread_id fallback logic from 11 files into a single
deerflow.utils.runtime.get_thread_id() function with a documented 3-level
cascade (runtime.context → runtime.config → get_config()).
The module docstring also clarifies the __pregel_runtime injection pattern used in
gateway mode.