sipeed/picoclaw · error

selected vision model %q does not support image input; updat

Error message

selected vision model %q does not support image input; update agents.defaults.image_model to a multimodal model

What it means

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.

Source

Thrown at pkg/agent/llm_media.go:78

	if strings.Contains(msg, "image_url") && strings.Contains(msg, "invalid") {
		return true
	}

	// DeepSeek and other strict providers reject the image_url field at the
	// JSON schema level with an "unknown variant" error rather than a semantic
	// "not supported" message.
	if strings.Contains(msg, "unknown variant") && strings.Contains(msg, "image_url") {
		return true
	}

	return false
}

func visionUnsupportedModelError(modelName string, imageModelConfigured bool) error {
	modelName = strings.TrimSpace(modelName)
	if imageModelConfigured {
		if modelName != "" {
			return fmt.Errorf(
				"selected vision model %q does not support image input; update agents.defaults.image_model to a multimodal model",
				modelName,
			)
		}
		return fmt.Errorf(
			"selected vision model does not support image input; update agents.defaults.image_model to a multimodal model",
		)
	}
	if modelName != "" {
		return fmt.Errorf(
			"active model %q does not support image input; configure agents.defaults.image_model with a multimodal model",
			modelName,
		)
	}
	return fmt.Errorf(
		"the active model does not support image input; configure agents.defaults.image_model with a multimodal model",
	)
}

View on GitHub (pinned to 49183d7e8d)

Solutions

  1. Set agents.defaults.image_model to a multimodal model (e.g. gpt-4o, claude-3-5-sonnet, gemini-1.5-pro)
  2. Verify the model id is current — providers rename slugs; check the provider's model list for image support
  3. If images are optional for your flow, strip them from messages so the text-only model can serve the request

Example fix

# before
agents:
  defaults:
    image_model: deepseek-chat

# after
agents:
  defaults:
    image_model: gpt-4o
Defensive patterns

Strategy: validation

Validate before calling

var multimodalModels = map[string]bool{
    "gpt-4o": true, "gpt-4o-mini": true,
    "claude-3-5-sonnet-latest": true, "gemini-1.5-pro": true,
}

func imageModelIsMultimodal(model string) bool {
    return multimodalModels[strings.TrimSpace(model)]
}

Try / catch

resp, err := stream(ctx, req)
if err != nil {
    if isVisionUnsupported(err) && messagesContainMedia(req.Messages) {
        // degrade gracefully: retry without media
        req.Messages = stripMessageMedia(req.Messages)
        resp, err = stream(ctx, req)
    }
    if err != nil { return resp, err }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/ef077a52d032b171. Report an issue: GitHub.