- Fixed generate_model_description to correctly handle Union types
- Union types without None are now properly formatted as Union[type1, type2]
- Union types with None are correctly wrapped in Optional[Union[...]]
- Added support for Python 3.10+ pipe syntax (int | str | None)
- Added comprehensive tests for Union type support
- Updated existing test expectations to match corrected behavior
This fixes issue #3735 where Union types were incorrectly wrapped in Optional
even when None was not part of the Union.
Co-Authored-By: João <joao@crewai.com>