Skip to main contentModule binary_detect
Source - IMAGE_MAX_BYTES
- Maximum file size for image passthrough (20 MB).
- binary_file_message
- Returns a helpful error message for binary files, including file type and suggestions.
- image_mime_type
- Returns the MIME type for an LLM-viewable image, or None if not viewable.
- is_binary_file
- Returns
true if the file is likely a binary file.
Checks extension first (zero I/O), falls back to content inspection. - is_llm_viewable_image
- Returns
true if the file is an image format that LLMs can view visually.