{"record":{"id":"b12e49467930681e","repo":"abiosoft/colima","slug":"model-name-is-required-for-ramalama-runner-usage","errorCode":null,"errorMessage":"model name is required for ramalama runner\nUsage: colima model serve <model>","messagePattern":"model name is required for ramalama runner\nUsage: colima model serve <model>","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/model.go","lineNumber":175,"sourceCode":"\t\t\treturn err\n\t\t}\n\n\t\t// Determine the model to serve\n\t\tvar modelName string\n\t\tif len(args) > 0 {\n\t\t\tmodelName = args[0]\n\t\t} else if runner.Name() == model.RunnerDocker {\n\t\t\t// For docker runner, get the first available model\n\t\t\tfirstModel, err := model.GetFirstModel()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif firstModel == \"\" {\n\t\t\t\treturn fmt.Errorf(\"no models available\\nPull a model first: colima model pull ai/smollm2\")\n\t\t\t}\n\t\t\tmodelName = firstModel\n\t\t} else {\n\t\t\treturn fmt.Errorf(\"model name is required for ramalama runner\\nUsage: colima model serve <model>\")\n\t\t}\n\n\t\tif err := runner.EnsureProvisioned(); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Ensure the model is available (pull if necessary) - this happens outside alternate screen\n\t\tnormalizedModel, err := runner.EnsureModel(modelName)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Determine the port to use\n\t\tport := modelCmdArgs.ServePort\n\t\tportExplicitlySet := cmd.Flags().Changed(\"port\")\n\n\t\t// If port was not explicitly set, find an available port starting from the default\n\t\tconst maxPortAttempts = 20","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/cmd/model.go#L157-L193","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Pass the model explicitly: `colima model serve <model>` with a ramalama model reference","Switch back to auto-pick behavior: `colima model serve --runner docker` (with at least one pulled model)","Pin the runner explicitly in scripts so a config default cannot silently switch semantics"],"exampleFix":"# before\n$ colima model serve --runner ramalama\nerror: model name is required for ramalama runner\n\n# after\n$ colima model serve --runner ramalama hf.co/lmstudio-community/smollm2-360m-instruct-GGUF","handlingStrategy":"validation","validationCode":"// in Go wrappers: enforce the arg before invoking the CLI\nif runnerName == string(model.RunnerRamalama) && len(args) == 0 {\n    return fmt.Errorf(\"model name required for ramalama; usage: colima model serve <model>\")\n}\n# shell: always pass the positional model\ncolima model serve --runner ramalama <model>","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat the model argument as mandatory when the runner is ramalama — no auto-discovery exists","Pin the runner explicitly in scripts so a config default cannot silently switch semantics"],"tags":["colima","llm","ramalama","cli","usage"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}