From 0dde45aa1fe4b877cfc035844ceee7fa4b5b85b9 Mon Sep 17 00:00:00 2001 From: Alex Cheema Date: Mon, 23 Feb 2026 13:21:56 -0800 Subject: [PATCH] fix: keep TRUST_REMOTE_CODE=True for built-in models The constant is the default for built-in models with known model cards, which are trusted. Custom models added via API already default to trust_remote_code=False in ModelCard.fetch_from_hf(). The CLI flag overrides custom models only. Co-Authored-By: Claude Opus 4.6 --- src/exo/worker/engines/mlx/constants.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/exo/worker/engines/mlx/constants.py b/src/exo/worker/engines/mlx/constants.py index 6da14c72..41ba1219 100644 --- a/src/exo/worker/engines/mlx/constants.py +++ b/src/exo/worker/engines/mlx/constants.py @@ -13,5 +13,6 @@ KV_CACHE_BITS: int | None = None DEFAULT_TOP_LOGPROBS: int = 5 -# Opt-in via --trust-remote-code CLI flag; default is False for security. -TRUST_REMOTE_CODE: bool = False +# True for built-in models with known model cards; custom models added via API default to False +# and can be overridden with the --trust-remote-code CLI flag. +TRUST_REMOTE_CODE: bool = True