- Extract robust JSON cleaning logic into shared clean_json_from_text() function
- Update LiteAgent to use clean_json_from_text() before model_validate_json()
- Add comprehensive test cases for JSON with trailing characters, markdown formatting, and prefixes
- Fixes GitHub issue #3191 where valid JSON failed to parse due to trailing text
- Maintains backward compatibility with existing JSON parsing behavior
Co-Authored-By: Jo\u00E3o <joao@crewai.com>