abiosoft/colima · error

model name is required for ramalama runner Usage: colima mod

Error message

model name is required for ramalama runner
Usage: colima model serve <model>

What it means

With the ramalama runner selected for `colima model serve`, there is no auto-discovery fallback: a positional model argument is mandatory. If args is empty and the runner is not RunnerDocker, the command refuses with a usage hint. Unlike the docker runner, ramalama does not consult a model list, so the CLI cannot guess a default.

Source

Thrown at cmd/model.go:175

			return err
		}

		// Determine the model to serve
		var modelName string
		if len(args) > 0 {
			modelName = args[0]
		} else if runner.Name() == model.RunnerDocker {
			// For docker runner, get the first available model
			firstModel, err := model.GetFirstModel()
			if err != nil {
				return err
			}
			if firstModel == "" {
				return fmt.Errorf("no models available\nPull a model first: colima model pull ai/smollm2")
			}
			modelName = firstModel
		} else {
			return fmt.Errorf("model name is required for ramalama runner\nUsage: colima model serve <model>")
		}

		if err := runner.EnsureProvisioned(); err != nil {
			return err
		}

		// Ensure the model is available (pull if necessary) - this happens outside alternate screen
		normalizedModel, err := runner.EnsureModel(modelName)
		if err != nil {
			return err
		}

		// Determine the port to use
		port := modelCmdArgs.ServePort
		portExplicitlySet := cmd.Flags().Changed("port")

		// If port was not explicitly set, find an available port starting from the default
		const maxPortAttempts = 20

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Pass the model explicitly: `colima model serve <model>` with a ramalama model reference
  2. Switch back to auto-pick behavior: `colima model serve --runner docker` (with at least one pulled model)
  3. Pin the runner explicitly in scripts so a config default cannot silently switch semantics

Example fix

# before
$ colima model serve --runner ramalama
error: model name is required for ramalama runner

# after
$ colima model serve --runner ramalama hf.co/lmstudio-community/smollm2-360m-instruct-GGUF
Defensive patterns

Strategy: validation

Validate before calling

// in Go wrappers: enforce the arg before invoking the CLI
if runnerName == string(model.RunnerRamalama) && len(args) == 0 {
    return fmt.Errorf("model name required for ramalama; usage: colima model serve <model>")
}
# shell: always pass the positional model
colima model serve --runner ramalama <model>

Prevention

When it happens

Trigger: Running `colima model serve` with `--runner ramalama` (or ramalama as the configured default runner) and no model name argument; CI/scripts written for the docker runner's no-arg behavior reused under ramalama.

Common situations: Switching runners via flag/config and forgetting the argument; copying a docker-runner invocation into a ramalama context; automation assuming first-model auto-pick works for all runners.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/b12e49467930681e. Report an issue: GitHub.