abiosoft/colima · error
error listing models: %w
Error message
error listing models: %w
What it means
listDockerModels executes `docker model list --json` inside the VM via guest.RunOutput and a non-zero exit surfaces here. Typical roots: the VM's docker engine/CLI lacks the model subcommand (older Docker), the docker daemon is unreachable inside the VM, or the call was made without the prerequisite checks (VM running) having passed.
Source
Thrown at model/runner.go:185
if err != nil {
return "", err
}
if len(models) == 0 {
return "", nil
}
// Return the first tag of the first model
if len(models[0].Tags) > 0 {
return models[0].Tags[0], nil
}
return "", nil
}
// listDockerModels returns all available models from docker model list.
func listDockerModels() ([]dockerModel, error) {
guest := lima.New(host.New())
output, err := guest.RunOutput("docker", "model", "list", "--json")
if err != nil {
return nil, fmt.Errorf("error listing models: %w", err)
}
output = strings.TrimSpace(output)
if output == "" || output == "[]" {
return nil, nil
}
var models []dockerModel
if err := json.Unmarshal([]byte(output), &models); err != nil {
return nil, fmt.Errorf("error parsing model list: %w", err)
}
return models, nil
}
// ResolveModelName resolves a short model name to its full tag.
// Supports flexible matching:
// - "smollm2" resolves to "docker.io/ai/smollm2:latest"View on GitHub (pinned to c3a5f9184d)
Solutions
- See the real error by running it in the VM: colima ssh -- docker model list --json
- Upgrade the VM's docker engine (colima stop && colima start --upgrade) so the model plugin exists
- Always enter through the public paths that call validateCommonPrerequisites first (VM running, docker runtime, krunkit)
Defensive patterns
Strategy: validation
Validate before calling
// probe plugin availability before parsing-dependent flows
if _, err := guest.RunOutput("docker", "model", "--help"); err != nil {
return nil, fmt.Errorf("docker model plugin not available in VM: %w", err)
} Prevention
- Keep the VM's docker engine current via colima start --upgrade
- Never call listDockerModels before VM/runtime prerequisites pass
- After colima start, wait for docker info to succeed before issuing model commands
When it happens
Trigger: Docker version in the colima VM predates `docker model`; docker daemon wedged or still initializing inside the VM; invoking listDockerModels directly, bypassing validateCommonPrerequisites.
Common situations: Older colima VM images carrying older Docker; commands run right after colima start while dockerd is not yet ready.
Related errors
- failed to pull model %q: %w
- error setting up AI model runner: %w
- dependency check failed for VM: %w
- error starting %s: %w
- error retrieving current runtime: empty value
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/0dbecff788a84a7b.
Report an issue: GitHub.