fix: resolve mypy no-redef error for reasoning_content

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2026-05-21 05:55:44 +00:00
parent e716541e1c
commit ce4399e769

View File

@@ -1234,7 +1234,7 @@ class LLM(BaseLLM):
text_response = response_message.content or ""
# Store reasoning_content for models that return it (e.g. DeepSeek thinking mode)
self.reasoning_content = getattr(
self.reasoning_content: str | None = getattr(
response_message, "reasoning_content", None
) or (
response_message.get("reasoning_content")
@@ -1751,7 +1751,7 @@ class LLM(BaseLLM):
ValueError: If response format is not supported
LLMContextLengthExceededError: If input exceeds model's context limit
"""
self.reasoning_content: str | None = None
self.reasoning_content = None
with llm_call_context() as call_id:
crewai_event_bus.emit(
self,