Skip to content

Commit c2d5b36

Browse files
Update cmd/cli/desktop/desktop.go
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent d5e1786 commit c2d5b36

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cmd/cli/desktop/desktop.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -524,16 +524,17 @@ func (c *Client) Remove(modelArgs []string, force bool) (string, error) {
524524
modelRemoved := ""
525525
for _, model := range modelArgs {
526526
// First, check if this looks like a model ID (no slash) - before normalizing
527+
isExpandedAsID := false
527528
if !strings.Contains(model, "/") {
528529
if expanded, err := c.fullModelID(model); err == nil {
529530
// It's a model ID, use the expanded form
530531
model = expanded
531-
} else {
532-
// Not a model ID, normalize normally
533-
model = dmrm.NormalizeModelName(model)
532+
isExpandedAsID = true
534533
}
535-
} else {
536-
// Has slash, normalize normally
534+
}
535+
536+
if !isExpandedAsID {
537+
// Not a valid model ID or has a slash, so normalize as a model name
537538
model = dmrm.NormalizeModelName(model)
538539
}
539540

0 commit comments

Comments
 (0)