@@ -238,7 +238,6 @@ func matchesMediaType(layerMT, targetMT oci.MediaType, modelFormat string) bool
238238 }
239239
240240 // Native ModelPack support: check format-specific ModelPack types
241- //nolint:exhaustive // Only GGUF and Safetensors need cross-format matching
242241 switch targetMT {
243242 case types .MediaTypeGGUF :
244243 if layerMT == modelpack .MediaTypeWeightGGUF {
@@ -248,6 +247,8 @@ func matchesMediaType(layerMT, targetMT oci.MediaType, modelFormat string) bool
248247 if layerMT == modelpack .MediaTypeWeightSafetensors {
249248 return true
250249 }
250+ default :
251+ // No format-specific ModelPack mapping for this media type
251252 }
252253
253254 // ModelPack model-spec support: format-agnostic weight types (.raw, .tar, etc.)
@@ -256,14 +257,15 @@ func matchesMediaType(layerMT, targetMT oci.MediaType, modelFormat string) bool
256257 // in their media type and are handled above; applying this fallback to them would
257258 // cause cross-format false positives (e.g., safetensors layer matching as GGUF).
258259 if modelFormat != "" && modelpack .IsModelPackGenericWeightMediaType (string (layerMT )) {
259- //nolint:exhaustive // Only weight formats need cross-format matching
260260 switch targetMT {
261261 case types .MediaTypeGGUF :
262262 return modelFormat == string (types .FormatGGUF )
263263 case types .MediaTypeSafetensors :
264264 return modelFormat == string (types .FormatSafetensors )
265265 case types .MediaTypeDDUF :
266266 return modelFormat == string (types .FormatDDUF ) || modelFormat == string (types .FormatDiffusers ) //nolint:staticcheck // FormatDiffusers kept for backward compatibility
267+ default :
268+ // No generic weight resolution for this media type
267269 }
268270 }
269271
0 commit comments