From 1a93818e54addb7c64ddce05cd53169ba895eb1d Mon Sep 17 00:00:00 2001 From: zhanqiuhu <49648934+ZhanqiuHu@users.noreply.github.com> Date: Tue, 5 May 2026 04:13:30 -0400 Subject: [PATCH] [Bugfix] Add GatedRepoError Report (#1616) Signed-off-by: Zhanqiu Hu --- vllm_omni/entrypoints/omni_base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vllm_omni/entrypoints/omni_base.py b/vllm_omni/entrypoints/omni_base.py index 4147c8027..f1d1e90a8 100644 --- a/vllm_omni/entrypoints/omni_base.py +++ b/vllm_omni/entrypoints/omni_base.py @@ -70,8 +70,14 @@ def omni_snapshot_download(model_id: str) -> str: allow_patterns=["*"], require_all=True, ) + except huggingface_hub.errors.GatedRepoError: + raise ValueError( + f"Access to model '{model_id}' is restricted. " + f"Visit https://huggingface.co/{model_id} to accept " + f"the license and request access." + ) except huggingface_hub.errors.RepositoryNotFoundError: - logger.warning("Repository not found for '%s'.", model_id) + raise ValueError(f"Repository not found for '{model_id}'. Please check the model name or path.") except PermissionError: logger.warning( "Permission denied when downloading '%s'. Assuming the model is already cached locally.",