@@ -143,15 +143,26 @@ def run_all_validations(config: SrtConfig) -> list[ValidationResult]:
143143 except Exception as e :
144144 results .append (ValidationResult ("container_path" , False , f"check failed: { e } " ))
145145
146- # HuggingFace model (if virtual identity is set)
146+ # HuggingFace model — check identity block first, fall back to model config
147147 try :
148- results .append (validate_hf_model (config .model .name , config .model .revision ))
148+ hf_repo = None
149+ hf_rev = None
150+ if hasattr (config , "identity" ) and config .identity and config .identity .model :
151+ hf_repo = config .identity .model .repo
152+ hf_rev = config .identity .model .revision
153+ if not hf_repo and hasattr (config .model , "name" ):
154+ hf_repo = config .model .name
155+ if not hf_rev and hasattr (config .model , "revision" ):
156+ hf_rev = config .model .revision
157+ results .append (validate_hf_model (hf_repo , hf_rev ))
149158 except Exception as e :
150159 results .append (ValidationResult ("hf_model" , False , f"check failed: { e } " ))
151160
152- # Docker image (if virtual identity is set )
161+ # Docker image (if set on model config )
153162 try :
154- results .append (validate_docker_image (config .model .container_image , config .model .container_digest ))
163+ container_image = getattr (config .model , "container_image" , None )
164+ container_digest = getattr (config .model , "container_digest" , None )
165+ results .append (validate_docker_image (container_image , container_digest ))
155166 except Exception as e :
156167 results .append (ValidationResult ("docker_image" , False , f"check failed: { e } " ))
157168
0 commit comments