[GH-ISSUE #2893] Improve error messages for missing arguments #1768

Open
opened 2026-04-12 11:47:12 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @swartz-k on GitHub (Mar 3, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2893

Background

While I am using ollama show MODEL command, I didn't know it need a MODEL name as args.
So I'm just typing ollama show, it will show message as below.

> ollama show
Error: accepts 1 arg(s), received 0

Until I use ollama show --help, it shows more friendly usage.

Motivation

More friendly error message or friendly usage.

Proposal

I think the upper error caused by this code.

21347e1ed6/cmd/cmd.go (L851)

After commenting out this line of code, the result of recompilation is much clearer.

> ollama show
Error: missing model name
Originally created by @swartz-k on GitHub (Mar 3, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2893 # Background While I am using `ollama show MODEL` command, I didn't know it need a `MODEL name` as args. So I'm just typing `ollama show`, it will show message as below. ``` bash > ollama show Error: accepts 1 arg(s), received 0 ``` Until I use `ollama show --help`, it shows more friendly usage. # Motivation More friendly error message or friendly usage. # Proposal I think the upper error caused by this code. https://github.com/ollama/ollama/blob/21347e1ed67a4ef36abc11bf314e90eaba9a0dc4/cmd/cmd.go#L851 After commenting out this line of code, the result of recompilation is much clearer. ``` bash > ollama show Error: missing model name ```
GiteaMirror added the bug label 2026-04-12 11:47:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1768