DeepSeek V4 models return reasoning_content alongside content when in thinking
mode. The API requires this field to be passed back in subsequent requests.
Previously, LLM.call() discarded reasoning_content and only returned the content
string, causing a 400 error on follow-up calls.
Changes:
- LLM.call(): Extract and store reasoning_content from the response message
- CrewAgentExecutor._format_msg(): Accept optional reasoning_content parameter
- CrewAgentExecutor._invoke_loop(): Include reasoning_content in assistant
messages added to the conversation history
Tests added for:
- LLM storing reasoning_content from responses
- LLM returning None when reasoning_content is absent
- LLM resetting reasoning_content between calls
- Executor _format_msg including/excluding reasoning_content appropriately
- End-to-end invoke loop preserving reasoning_content in message history
Co-Authored-By: João <joao@crewai.com>