This commit is contained in:
2026-03-29 16:19:26 +08:00
parent 289145e901
commit 56a5c2e4c0
7 changed files with 19 additions and 23 deletions
+6 -5
View File
@@ -43,11 +43,12 @@ def _resolve_profile_model_path(profile: dict[str, Any], model_root: str, model_
raise ValueError(f"model profile '{model_key}' must provide local_path")
if "://" in local_path:
raise ValueError(f"model profile '{model_key}' local_path must be local filesystem path")
if local_path.startswith("/"):
return local_path
if not model_root:
raise ValueError("config.json model_root cannot be empty when local_path is relative")
return _join_posix(model_root, local_path)
resolved = local_path
if not local_path.startswith("/"):
if not model_root:
raise ValueError("config.json model_root cannot be empty when local_path is relative")
resolved = _join_posix(model_root, local_path)
return resolved
def load_catalog(catalog_path: str = "config.json") -> dict[str, Any]: