package engines import ( "slices" "testing" ) func TestAModelDownloadedByTheEngineIsReadAsSafetensorsOnly(t *testing.T) { for path, want := range map[string]bool{ "Qwen/Qwen2.5-7B-Instruct": true, "/var/lib/llmgw/weights/abc/": false, "./local": false, "http://m/q/v/": false, "q.gguf": false, } { got := slices.Contains(safetensorsOnly(Profile{ModelPath: path}), "safetensors") if got != want { t.Errorf("%q: safetensors only = %v, want %v", path, got, want) } } if len(safetensorsOnly(Profile{ModelPath: "Qwen/Qwen2.5-7B-Instruct", AllowPickle: true})) != 0 { t.Error("allow_pickle still forced safetensors") } }