| 149 | return load(request); |
| 150 | } |
| 151 | |
| 152 | void ModelRegistry::validate_request(const ModelLoadRequest & request) const { |
| 153 | const bool builtin_audio_utility_id = |
| 154 | request.family_hint.has_value() && |
| 155 | *request.family_hint == "builtin_audio_utils" && |
| 156 | engine::audio::find_builtin_audio_utility(request.model_path.generic_string()).has_value(); |
| 157 | if (!builtin_audio_utility_id && |
| 158 | !engine::io::is_existing_file(request.model_path) && |
| 159 | !engine::io::is_existing_directory(request.model_path)) { |
| 160 | throw std::runtime_error("model path does not exist: " + request.model_path.string()); |
| 161 | } |
nothing calls this directly
no test coverage detected