{"record":{"id":"8d3bc7d44944bf4c","repo":"abiosoft/colima","slug":"could-not-determine-hash-for-model-q","errorCode":null,"errorMessage":"could not determine hash for model %q","messagePattern":"could not determine hash for model %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"model/docker.go","lineNumber":210,"sourceCode":"\t\tcfg.GPULayers = 999\n\t}\n\n\t// Get the model info (model should already be available via EnsureDockerModel)\n\tmodelInfo, err := InspectDockerModel(cfg.ModelName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to inspect model %q: %w\", cfg.ModelName, err)\n\t}\n\n\t// Check model format - only GGUF models are supported\n\tif modelInfo.Config.Format != \"gguf\" {\n\t\treturn fmt.Errorf(\"model %q has format %q, only GGUF models are supported\\n\"+\n\t\t\t\"Try a GGUF version of this model (e.g., from TheBloke on HuggingFace)\",\n\t\t\tcfg.ModelName, modelInfo.Config.Format)\n\t}\n\n\tmodelHash := modelInfo.Hash()\n\tif modelHash == \"\" {\n\t\treturn fmt.Errorf(\"could not determine hash for model %q\", cfg.ModelName)\n\t}\n\n\t// Ensure docker-model-runner container is running (needed to find GGUF path)\n\tif err := ensureDockerModelRunner(guest); err != nil {\n\t\treturn err\n\t}\n\n\t// Find the GGUF file path (handles both Docker registry and HuggingFace models)\n\tggufPath, err := findGGUFPath(guest, modelHash)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not find GGUF file for model %q: %w\", cfg.ModelName, err)\n\t}\n\n\t// Get container IP\n\tcontainerIP, err := getDockerModelRunnerIP(guest)\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/model/docker.go#L192-L228","documentation":"ServeDockerModel derives the model's content hash via modelInfo.Hash(); an empty result means the inspect JSON lacked the field Hash() reads (the ID/config digest). The model is inspectable but its identity fields are absent, so no bundle path can be computed.","triggerScenarios":"Docker version whose inspect output omits or renames the ID/digest field Hash() relies on; a partially pulled or mid-deletion model whose metadata is incomplete; schema drift after a Model Runner update.","commonSituations":"Version skew between the docker CLI in the colima VM and colima's DockerModelInfo struct; models interrupted mid-pull; runner reinstalled while a model entry lingered.","solutions":["Inspect the raw record: colima ssh -- docker model inspect <name> and check which identity fields are present","Re-pull the model to regenerate complete metadata, then retry serve","Update colima (struct may need the new field) and/or the Docker engine in the VM","If a stale entry is the cause, docker model rm it first"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"info, err := InspectDockerModel(cfg.ModelName)\nif err == nil && info.Hash() == \"\" {\n    // re-pull or bail before ServeDockerModel\n}","typeGuard":"func hasModelIdentity(info *DockerModelInfo) bool {\n    return info != nil && info.Hash() != \"\"\n}","tryCatchPattern":"modelHash := modelInfo.Hash()\nif modelHash == \"\" {\n    return fmt.Errorf(\"could not determine hash for model %q — re-pull the model or update docker/colima\", cfg.ModelName)\n}","preventionTips":["After Docker upgrades in the VM, sanity-check docker model inspect output for the ID/digest fields","Re-pull models whose metadata looks incomplete instead of serving them","Keep colima updated so DockerModelInfo matches the current inspect schema"],"tags":["docker","inspect","model-metadata","schema-drift"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}