From 7d7508b9687bc253fe4b983c92b92f635f31bd67 Mon Sep 17 00:00:00 2001 From: Comma Device Date: Fri, 4 Sep 2026 19:44:24 +0800 Subject: [PATCH] models: auto-download default model (CD210) when no qcom bundle selected Mirror upstream first-boot behavior: with nothing selected on qcom, queue DEFAULT_MODEL_REF so the default model (CD210) is downloaded and activated automatically, instead of falling back to the stock selfdrive modeld (which needs a compile-format pkl that is not shipped here). --- openpilot/sunnypilot/models/manager.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openpilot/sunnypilot/models/manager.py b/openpilot/sunnypilot/models/manager.py index 035f59891..92797146f 100644 --- a/openpilot/sunnypilot/models/manager.py +++ b/openpilot/sunnypilot/models/manager.py @@ -334,6 +334,17 @@ class ModelManagerSP: if DEFAULT_MODEL_REF: self.params.put("ModelManager_DownloadRef", DEFAULT_MODEL_REF) + # First-boot default: no qcom bundle selected -> auto-use the default + # model (DEFAULT_MODEL_REF, i.e. CD210) instead of falling back to the + # stock selfdrive modeld. Mirrors upstream: the default model runs on + # first boot without any user selection (downloaded once, then active). + if (get_selected_bundle(self.params, "qcom") is None + and self.params.get("ModelManager_DownloadRef") is None + and not self.chestnut_present): + from openpilot.sunnypilot.models.model_name import DEFAULT_MODEL_REF + if DEFAULT_MODEL_REF: + self.params.put("ModelManager_DownloadRef", DEFAULT_MODEL_REF) + self._process_download_requests() if self.params.get("ModelManager_ClearCache"):