From e553a8ad0bc9645fdad3159c8f49f4340ab144a1 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 2 Apr 2026 12:18:11 -0700 Subject: [PATCH] fix(studio): suppress fatal error when prebuilt manifest is missing (#4799) When DEFAULT_PUBLISHED_REPO is ggml-org/llama.cpp, the prebuilt resolver raises PrebuiltFallback because ggml-org releases do not include a llama-prebuilt-manifest.json asset. This was caught by the generic Exception handler and printed as "fatal helper error" to stderr, which triggers NativeCommandError on PowerShell. Catch PrebuiltFallback separately in the top-level __main__ handler and exit with EXIT_FALLBACK (code 2) instead of EXIT_ERROR (code 1). The message is still logged but without the "fatal helper error" prefix. The shell scripts already handle non-zero exits and fall back to source builds. Co-authored-by: Daniel Han --- studio/install_llama_prebuilt.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.py index 1b02729649..5e8fe314b4 100755 --- a/studio/install_llama_prebuilt.py +++ b/studio/install_llama_prebuilt.py @@ -4733,6 +4733,12 @@ if __name__ == "__main__": f"fatal helper busy conflict: {textwrap.shorten(str(exc), width = 400, placeholder = '...')}" ) raise SystemExit(EXIT_BUSY) + except PrebuiltFallback as exc: + # Expected when the published repo (e.g. ggml-org/llama.cpp) has no + # prebuilt manifest. Exit quietly with EXIT_FALLBACK so the caller + # falls back to source build without a noisy "fatal helper error". + log(textwrap.shorten(str(exc), width = 400, placeholder = "...")) + raise SystemExit(EXIT_FALLBACK) except Exception as exc: message = textwrap.shorten(str(exc), width = 400, placeholder = "...") log(f"fatal helper error: {message}")