{"record":{"id":"fa2b39874af4bace","repo":"sipeed/picoclaw","slug":"active-model-q-does-not-support-image-input-conf","errorCode":null,"errorMessage":"active model %q does not support image input; configure agents.defaults.image_model with a multimodal model","messagePattern":"active model %q does not support image input; configure agents\\.defaults\\.image_model with a multimodal model","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/agent/llm_media.go","lineNumber":88,"sourceCode":"\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}\n\tfor i := range a {\n\t\tif a[i].StableKey() != b[i].StableKey() {\n\t\t\treturn false\n\t\t}\n\t}","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/agent/llm_media.go#L70-L106","documentation":"Raised via visionUnsupportedModelError when an image-bearing request failed with a vision-unsupported provider error, no image_model override is configured, and the active (main) model's name is known. The message names the active model and recommends configuring agents.defaults.image_model with a multimodal model so images can be routed elsewhere.","triggerScenarios":"Running a text-only main model (e.g. deepseek-chat, llama-3 text) and attaching an image to a message: messagesContainMedia is true, the provider rejects the image_url content, and no agents.defaults.image_model exists to fall back to.","commonSituations":"Users switch the default agent to a cheaper text-only model and forget images need routing; screenshots pasted into a CLI backed by a text model; a tool returning image output into a text-model session.","solutions":["Configure agents.defaults.image_model with a multimodal model so image traffic is routed there","Or switch the main model to a multimodal one","Or remove/suppress the image content (the pipeline's stripMessageMedia path) if it's not needed"],"exampleFix":"# before\nagents:\n  defaults:\n    model: deepseek-chat\n    # no image_model configured\n\n# after\nagents:\n  defaults:\n    model: deepseek-chat\n    image_model: gpt-4o","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"resp, err := stream(ctx, req)\nif err != nil {\n    if isVisionUnsupported(err) && messagesContainMedia(req.Messages) {\n        // no image_model configured: drop media and retry on the text model\n        req.Messages = stripMessageMedia(req.Messages)\n        resp, err = stream(ctx, req)\n    }\n    if err != nil { return resp, err }\n}","preventionTips":["Whenever the main model is text-only, configure agents.defaults.image_model","Test the agent once with an image after any model switch","Gate image-producing tools on the presence of a multimodal route"],"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"}