Implements aclose() and cancel() methods on CrewStreamingOutput and
FlowStreamingOutput to allow callers to abort in-flight streaming and
release resources promptly (e.g. when an HTTP client disconnects).
- Add aclose() async method for async streaming contexts
- Add cancel() sync method for sync streaming contexts
- Add is_cancelled property to check cancellation state
- Update create_async_chunk_generator to support cancel events
- Update create_chunk_generator to support cancel thread events
- Add comprehensive tests for cancellation scenarios
Closes#5312
Co-Authored-By: João <joao@crewai.com>
When monitoring LLM events, consumers need to know which events belong
to the same API call. Before this change, there was no way to correlate
LLMCallStartedEvent, LLMStreamChunkEvent, and LLMCallCompletedEvent
belonging to the same request.
- add input_files parameter to Crew.kickoff(), Flow.kickoff(), Task, and Agent.kickoff()
- add provider-specific file uploaders for OpenAI, Anthropic, Gemini, and Bedrock
- add file type detection, constraint validation, and automatic format conversion
- add URL file source support for multimodal content
- add streaming uploads for large files
- add prompt caching support for Anthropic
- add OpenAI Responses API support