{"record":{"id":"ef077a52d032b171","repo":"sipeed/picoclaw","slug":"selected-vision-model-q-does-not-support-image-in","errorCode":null,"errorMessage":"selected vision model %q does not support image input; update agents.defaults.image_model to a multimodal model","messagePattern":"selected vision model %q 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":78,"sourceCode":"\tif strings.Contains(msg, \"image_url\") && strings.Contains(msg, \"invalid\") {\n\t\treturn true\n\t}\n\n\t// DeepSeek and other strict providers reject the image_url field at the\n\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}","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/agent/llm_media.go#L60-L96","documentation":"Raised via visionUnsupportedModelError when an LLM request containing images failed and the provider error matched isVisionUnsupportedError (strings like \"no endpoints found that support image input\", \"does not support image input\", \"unknown variant\" + \"image_url\"), while an explicit vision model IS configured under agents.defaults.image_model and its name is known. The message names the offending model and tells you to change that setting to a multimodal one.","triggerScenarios":"agents.defaults.image_model set to a text-only model (e.g. deepseek-chat, a text llama variant) and the conversation includes media; the provider rejects the image_url payload and the error string matches the known vision-unsupported signatures.","commonSituations":"Pointing image_model at a cheap text model to save costs; provider model id renamed to a non-multimodal variant; default image model changed by an upstream provider; using an OpenRouter model slug whose endpoints lack image support.","solutions":["Set agents.defaults.image_model to a multimodal model (e.g. gpt-4o, claude-3-5-sonnet, gemini-1.5-pro)","Verify the model id is current — providers rename slugs; check the provider's model list for image support","If images are optional for your flow, strip them from messages so the text-only model can serve the request"],"exampleFix":"# before\nagents:\n  defaults:\n    image_model: deepseek-chat\n\n# after\nagents:\n  defaults:\n    image_model: gpt-4o","handlingStrategy":"validation","validationCode":"var multimodalModels = map[string]bool{\n    \"gpt-4o\": true, \"gpt-4o-mini\": true,\n    \"claude-3-5-sonnet-latest\": true, \"gemini-1.5-pro\": true,\n}\n\nfunc imageModelIsMultimodal(model string) bool {\n    return multimodalModels[strings.TrimSpace(model)]\n}","typeGuard":null,"tryCatchPattern":"resp, err := stream(ctx, req)\nif err != nil {\n    if isVisionUnsupported(err) && messagesContainMedia(req.Messages) {\n        // degrade gracefully: retry without media\n        req.Messages = stripMessageMedia(req.Messages)\n        resp, err = stream(ctx, req)\n    }\n    if err != nil { return resp, err }\n}","preventionTips":["Verify image support in the provider's model list before configuring image_model","Re-check multimodal slugs after provider model renames","Keep a fallback path that strips media when the vision model is unavailable"],"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"}