fix: allow text files with non-multimodal models (#5137)
TextFiles passed via input_files incorrectly triggered a 'Model does not support multimodal input' error for non-vision-capable models. Text files are now inlined as text content in the message instead of being rejected. Changes: - base_llm.py: Rewrite _process_message_files to distinguish text files from binary files; add _is_text_file helper - llm.py: Apply same text-file inlining logic in both sync and async _process_message_files methods - crew.py: Recognize text file MIME types as auto-injectable so they don't require the read_file tool - task.py: Same text-file auto-injection logic in prompt method - tests: Add 17 tests covering text file inlining, image rejection, mixed files, _is_text_file helper, and edge cases Co-Authored-By: João <joao@crewai.com>
D
Devin AI committed
d0793e5ec31ef91da7b91870b36dc25614ba5616
Parent: 9fe0c15