Commit Graph

9 Commits

Author SHA1 Message Date
Greyson LaLonde
dc4bbfb5b9 feat(files): add api parameter to format_multimodal_content
Allows selecting OpenAIResponsesFormatter via api="responses" parameter
instead of always using Chat Completions format.
2026-01-23 02:06:09 -05:00
Greyson LaLonde
4ab53c0726 feat(files): add file_id upload support and text file handling
- Add VCR patch for binary request bodies (base64 encoding fallback)
- Add generate_filename() utility for UUID-based filenames with extension
- Add OpenAIResponsesFormatter for Responses API (input_image, input_file)
- Fix OpenAI uploader to use 'vision' purpose for images
- Fix Anthropic uploader to use tuple format (filename, content, content_type)
- Add TextConstraints and text support for Gemini
- Add file_id upload integration tests for Anthropic and OpenAI Responses API
2026-01-23 01:57:29 -05:00
Greyson LaLonde
661d4d29b2 test: add Gemini video and audio integration tests 2026-01-22 23:16:08 -05:00
Greyson LaLonde
8be27da9ff docs: add README and description for crewai-files package 2026-01-22 22:50:10 -05:00
Greyson LaLonde
2c5e794ea3 feat: allow LLM providers to pass clients to file uploaders
- Add get_file_uploader() method to BaseLLM (returns None by default)
- Implement get_file_uploader() in Anthropic, OpenAI, Gemini, Bedrock
- Pass both sync and async clients where applicable
- Update uploaders to accept optional pre-instantiated clients
- Update factory to pass through client parameters

This allows reusing authenticated LLM clients for file uploads,
avoiding redundant connections.
2026-01-22 22:44:05 -05:00
Greyson LaLonde
a1cbb2f4e2 refactor: improve multimodal file handling architecture
- Make crewai_files an optional dependency with graceful fallbacks
- Move file formatting from executor to LLM layer (_process_message_files)
- Add files field to LLMMessage type for cleaner message passing
- Add cache_control to Anthropic content blocks for prompt caching
- Clean up formatters: static methods for OpenAI/Gemini, proper error handling
- Remove unused ContentFormatter protocol
- Move test fixtures to lib/crewai-files/tests/fixtures
- Add Azure and Bedrock multimodal integration tests
- Fix mypy errors in crew_agent_executor.py
2026-01-22 21:55:10 -05:00
Greyson LaLonde
4bd32f6626 fix: import Self from typing_extensions for Python 3.10 compatibility 2026-01-22 20:16:25 -05:00
Greyson LaLonde
ca07114bcf refactor: centralize multimodal formatting in crewai_files 2026-01-22 15:59:55 -05:00
Greyson LaLonde
b95a3a9bc8 refactor: extract files module to standalone crewai-files package 2026-01-22 15:06:20 -05:00