Skip to content

Commit c183daa

Browse files
authored
Merge pull request #374 from docker/docker-model-run-short
Expand if possible
2 parents 954751e + b381cd7 commit c183daa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmd/cli/desktop/desktop.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,9 @@ func (c *Client) Inspect(model string, remote bool) (dmrm.Model, error) {
266266
!strings.Contains(model, "@") {
267267
// Do an extra API call to check if the model parameter isn't a model ID.
268268
modelId, err := c.fullModelID(model)
269-
if err != nil {
270-
return dmrm.Model{}, fmt.Errorf("invalid model name: %s", model)
269+
if err == nil {
270+
model = modelId
271271
}
272-
model = modelId
273272
}
274273
}
275274
rawResponse, err := c.listRawWithQuery(fmt.Sprintf("%s/%s", inference.ModelsPrefix, model), model, remote)

0 commit comments

Comments
 (0)