resolveModelFilePath method
Resolve the primary load target for a generated ModelInfo.
Delegates artifact layout, archive shape, and companion-file handling to the commons model-path resolver so callers do not scan model directories or infer filenames in Dart.
Implementation
Future<String> resolveModelFilePath(ModelInfo model) {
if (!DartBridge.isInitialized) {
throw SDKException.notInitialized();
}
final resolution = DartBridge.modelPaths.resolveArtifact(model);
final path = resolution?.primaryModelPath;
if (resolution == null ||
!resolution.isComplete ||
path == null ||
path.isEmpty) {
throw SDKException.modelNotFound(
'Could not resolve complete model artifact for: ${model.id}',
);
}
return Future.value(path);
}