Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/root/doctor.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (f *doctorFlags) buildReport(ctx context.Context, agentRef string) (*doctor
case dmrDown:
autoStatus.Usable = false
report.Issues = append(report.Issues, fmt.Sprintf(
"no usable model: no provider credential was found and Docker Model Runner is %s; set an API key for one of the providers above (%s) or install Docker Model Runner (%s)",
"no usable model: no provider credential was found and Docker Model Runner is %s; run `docker agent setup`, or set an API key for one of the providers above (%s) or install Docker Model Runner (%s)",
describeDMRStatus(report.DMR.Status), environment.SecretsDocsURL, dmrDocsURL))
case !slices.Contains(dmrModels, auto.Model):
autoStatus.Note = fmt.Sprintf("not pulled yet; run `docker model pull %s` or let the first run pull it", auto.Model)
Expand Down
1 change: 1 addition & 0 deletions cmd/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ We collect anonymous usage data to help improve docker agent. To disable:
newEvalCmd(),
newShareCmd(),
newModelsCmd(),
newSetupCmd(),
newDoctorCmd(),
newDebugCmd(),
newAliasCmd(),
Expand Down
5 changes: 4 additions & 1 deletion cmd/root/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ func (f *runExecFlags) runRunCommand(cmd *cobra.Command, args []string) (command

out := cli.NewPrinter(cmd.OutOrStdout())

return f.runOrExec(ctx, out, args, useTUI)
// When an interactive run cannot find any usable model, offer the setup
// wizard instead of leaving the user alone with the error.
err := f.runOrExec(ctx, out, args, useTUI)
return f.offerSetupOnNoModel(ctx, cmd, out, args, useTUI, err)
}

func (f *runExecFlags) runOrExec(ctx context.Context, out *cli.Printer, args []string, useTUI bool) error {
Expand Down
Loading
Loading