[BUG] VisionTool: image_path_url default value is the description string, making the required argument optional
Summary
lib/crewai-tools/src/crewai_tools/tools/vision_tool/vision_tool.py:29 declares:
image_path_url: str = "The image path or URL."
The intended Field(..., description="The image path or URL.") collapsed into a plain default value (compare the correct form in OCRToolSchema, ocr_tool.py:26). Two consequences:
- The LLM-visible JSON schema no longer marks
image_path_urlas required, so the model is invited to omit it. - When omitted,
_validate_kwargsvalidates{}successfully and passesimage_path_url="The image path or URL."into_run; the truthy default bypasses theif not image_path_url:guard (lines 141-143), and the tool fails withAn error occurred: Image file does not exist: The image path or URL.instead of a clean validation error.
Verified via ImagePromptSchema.model_json_schema() (no required, property default is the description string) and ImagePromptSchema.model_validate({}) (returns the description string as the value).
Possible fix
image_path_url: str = Field(..., description="The image path or URL.")
Disclosure
This issue and the upcoming PR are AI-agent-assisted (generated with an AI coding agent). Please apply the llm-generated label per CONTRIBUTING - I cannot set labels without triage permission.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.