Skip to content

Commit fa50f26

Browse files
committed
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.
1 parent 1d91357 commit fa50f26

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

cmd/cli/commands/ps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func psTable(ps []desktop.BackendStatus) string {
3939
if strings.HasPrefix(modelName, "sha256:") {
4040
modelName = modelName[7:19]
4141
} else {
42-
modelName = stripDefaultsFromModelName(modelName)
42+
modelName = strings.ToLower(stripDefaultsFromModelName(modelName))
4343
}
4444

4545
table.Append([]string{

e2e/cli_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ func TestE2E_CLI(t *testing.T) {
4545
if err != nil {
4646
t.Fatalf("cli ps failed: %v\noutput: %s", err, out)
4747
}
48-
// TODO: ps should return lowercased model names like ls does
49-
if !strings.Contains(strings.ToLower(out), "smollm2") {
48+
if !strings.Contains(out, "smollm2") {
5049
t.Errorf("expected model in ps output, got:\n%s", out)
5150
}
5251
if !strings.Contains(out, bc.name) {

0 commit comments

Comments
 (0)