From fa50f26d606638746413ac259dd1eab85d803442 Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Sat, 4 Apr 2026 04:05:48 -0700 Subject: [PATCH 1/2] Lowercase model names in ps output The ps command now lowercases model names after stripping defaults, matching the casing behavior of the ls command. Previously, ps would display names in the original case used during model loading, while ls always showed lowercase names from the registry. Also removes the ToLower workaround in the e2e test that was compensating for this inconsistency. --- cmd/cli/commands/ps.go | 2 +- e2e/cli_test.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/cli/commands/ps.go b/cmd/cli/commands/ps.go index 40270a82b..045251e07 100644 --- a/cmd/cli/commands/ps.go +++ b/cmd/cli/commands/ps.go @@ -39,7 +39,7 @@ func psTable(ps []desktop.BackendStatus) string { if strings.HasPrefix(modelName, "sha256:") { modelName = modelName[7:19] } else { - modelName = stripDefaultsFromModelName(modelName) + modelName = strings.ToLower(stripDefaultsFromModelName(modelName)) } table.Append([]string{ diff --git a/e2e/cli_test.go b/e2e/cli_test.go index 47f9c5a44..0821774cd 100644 --- a/e2e/cli_test.go +++ b/e2e/cli_test.go @@ -45,8 +45,7 @@ func TestE2E_CLI(t *testing.T) { if err != nil { t.Fatalf("cli ps failed: %v\noutput: %s", err, out) } - // TODO: ps should return lowercased model names like ls does - if !strings.Contains(strings.ToLower(out), "smollm2") { + if !strings.Contains(out, "smollm2") { t.Errorf("expected model in ps output, got:\n%s", out) } if !strings.Contains(out, bc.name) { From 249bb42ab60bd4188dbac6c230ec4c9d2dab75d6 Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Sat, 4 Apr 2026 10:47:01 -0700 Subject: [PATCH 2/2] fix: lowercase before stripping defaults for mixed-case model names Apply strings.ToLower before stripDefaultsFromModelName so that case-sensitive prefix/suffix matching (e.g. "ai/", ":latest") works correctly on mixed-case backend responses like "AI/Gemma:Latest". Co-Authored-By: Claude Opus 4.6 (1M context) --- cmd/cli/commands/ps.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cli/commands/ps.go b/cmd/cli/commands/ps.go index 045251e07..06ae9b0bb 100644 --- a/cmd/cli/commands/ps.go +++ b/cmd/cli/commands/ps.go @@ -39,7 +39,7 @@ func psTable(ps []desktop.BackendStatus) string { if strings.HasPrefix(modelName, "sha256:") { modelName = modelName[7:19] } else { - modelName = strings.ToLower(stripDefaultsFromModelName(modelName)) + modelName = stripDefaultsFromModelName(strings.ToLower(modelName)) } table.Append([]string{