Files
crewAI/tests/utilities
Devin AI f76c55ffa7 Fix Union type handling in Pydantic output generation
- 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>
2025-10-19 21:33:03 +00:00
..
2024-12-10 11:18:45 -05:00
2024-05-02 05:00:29 -03:00