Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
types/model: fix tag case
Michael Yang486a2c1d9478
diff --git a/types/model/name.go b/types/model/name.goindex 6d2a187bc..b79374c3b 100644--- a/types/model/name.go+++ b/types/model/name.go@@ -290,12 +290,14 @@ func (n Name) Filepath() string {if !n.IsFullyQualified() {panic("illegal attempt to get filepath of invalid name")}- return strings.ToLower(filepath.Join(- n.Host,- n.Namespace,- n.Model,+ return filepath.Join(+ strings.ToLower(filepath.Join(+ n.Host,+ n.Namespace,+ n.Model,+ )),n.Tag,- ))+ )}// LogValue returns a slog.Value that represents the name as a string.diff --git a/types/model/name_test.go b/types/model/name_test.goindex 19bc2e2d7..fb584291e 100644--- a/types/model/name_test.go+++ b/types/model/name_test.go@@ -19,6 +19,16 @@ func TestParseNameParts(t *testing.T) {wantFilepath stringwantValidDigest bool}{+ {+ in: "registry.ollama.ai/library/dolphin-mistral:7b-v2.6-dpo-laser-q6_K",+ want: Name{+ Host: "registry.ollama.ai",+ Namespace: "library",+ Model: "dolphin-mistral",+ Tag: "7b-v2.6-dpo-laser-q6_K",+ },+ wantFilepath: filepath.Join("registry.ollama.ai", "library", "dolphin-mistral", "7b-v2.6-dpo-laser-q6_K"),+ },{in: "scheme://host:port/namespace/model:tag",want: Name{@@ -266,9 +276,9 @@ func TestFilepathAllocs(t *testing.T) {allocs := testing.AllocsPerRun(1000, func() {n.Filepath()})- allowedAllocs := 2.0+ var allowedAllocs float64 = 3if runtime.GOOS == "windows" {- allowedAllocs = 4+ allowedAllocs = 5}if allocs > allowedAllocs {t.Errorf("allocs = %v; allowed %v", allocs, allowedAllocs)