{"record":{"id":"f628ae43558d37fb","repo":"sipeed/picoclaw","slug":"selected-vision-model-does-not-support-image-input","errorCode":null,"errorMessage":"selected vision model does not support image input; update agents.defaults.image_model to a multimodal model","messagePattern":"selected vision model does not support image input; update agents\\.defaults\\.image_model to a multimodal model","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/agent/llm_media.go","lineNumber":83,"sourceCode":"\t// JSON schema level with an \"unknown variant\" error rather than a semantic\n\t// \"not supported\" message.\n\tif strings.Contains(msg, \"unknown variant\") && strings.Contains(msg, \"image_url\") {\n\t\treturn true\n\t}\n\n\treturn false\n}\n\nfunc visionUnsupportedModelError(modelName string, imageModelConfigured bool) error {\n\tmodelName = strings.TrimSpace(modelName)\n\tif imageModelConfigured {\n\t\tif modelName != \"\" {\n\t\t\treturn fmt.Errorf(\n\t\t\t\t\"selected vision model %q does not support image input; update agents.defaults.image_model to a multimodal model\",\n\t\t\t\tmodelName,\n\t\t\t)\n\t\t}\n\t\treturn fmt.Errorf(\n\t\t\t\"selected vision model does not support image input; update agents.defaults.image_model to a multimodal model\",\n\t\t)\n\t}\n\tif modelName != \"\" {\n\t\treturn fmt.Errorf(\n\t\t\t\"active model %q does not support image input; configure agents.defaults.image_model with a multimodal model\",\n\t\t\tmodelName,\n\t\t)\n\t}\n\treturn fmt.Errorf(\n\t\t\"the active model does not support image input; configure agents.defaults.image_model with a multimodal model\",\n\t)\n}\n\nfunc sameCandidateSet(a, b []providers.FallbackCandidate) bool {\n\tif len(a) != len(b) {\n\t\treturn false\n\t}","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/agent/llm_media.go#L65-L101","documentation":"Same vision-unsupported condition as error 273, but the configured image model's name could not be determined (empty/blank after trim), so the error cannot name it. It still confirms an image_model was explicitly configured under agents.defaults.image_model and that model rejected image input.","triggerScenarios":"agents.defaults.image_model configured but resolving to an empty/whitespace model name at failure time — misparsed config, an empty-string override, or a lookup that produced no name — combined with an image-bearing request whose provider error matched isVisionUnsupportedError.","commonSituations":"Template/env interpolation producing an empty model name in generated config; config key typo causing the value to be read from elsewhere; a stale config where the image model field is blank.","solutions":["Inspect the loaded config (print the effective agents.defaults.image_model) to see why the name is empty","Set image_model to an explicit multimodal model id","Fix the config templating/env var that yields a blank value"],"exampleFix":"# before\nagents:\n  defaults:\n    image_model: \"${VISION_MODEL}\"   # env var unset → empty\n\n# after\nagents:\n  defaults:\n    image_model: gpt-4o","handlingStrategy":"validation","validationCode":"func effectiveImageModel(cfg *config.Config) string {\n    return strings.TrimSpace(cfg.Agents.Defaults.ImageModel)\n}\n\n// fail fast at startup if the field is configured but resolves empty\nif cfg.Agents.Defaults.ImageModelKeySet && effectiveImageModel(cfg) == \"\" {\n    return errors.New(\"agents.defaults.image_model is set but resolves to an empty model name\")\n}","typeGuard":null,"tryCatchPattern":"resp, err := stream(ctx, req)\nif err != nil && strings.Contains(err.Error(), \"does not support image input\") {\n    return resp, fmt.Errorf(\"vision routing broken: %w\", err)\n}","preventionTips":["Assert non-empty image_model after config templating/env interpolation","Add startup validation that rejects blank model names in defaults","Log the effective model names once at boot for diagnosability"],"tags":["vision","multimodal","config","providers","llm"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}