From 9c1096dbdca1ba8663a83c08775fc72f4fe8a521 Mon Sep 17 00:00:00 2001 From: Jonathan Hill Date: Sat, 20 Sep 2025 20:57:18 -0500 Subject: [PATCH] fix: Make 'ready' parameter optional in _create_reasoning_plan function (#3561) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Make 'ready' parameter optional in _create_reasoning_plan function This PR fixes Issue #3466 where the _create_reasoning_plan function was missing the 'ready' parameter when called by the LLM. The fix makes the 'ready' parameter optional with a default value of False, which allows the function to be called with only the 'plan' argument. Fixes #3466 * Change default value of 'ready' parameter to True --------- Co-authored-by: João Moura --- src/crewai/utilities/reasoning_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crewai/utilities/reasoning_handler.py b/src/crewai/utilities/reasoning_handler.py index 1f9209814..f5c4636ae 100644 --- a/src/crewai/utilities/reasoning_handler.py +++ b/src/crewai/utilities/reasoning_handler.py @@ -259,7 +259,7 @@ class AgentReasoning: ) # Prepare a simple callable that just returns the tool arguments as JSON - def _create_reasoning_plan(plan: str, ready: bool): # noqa: N802 + def _create_reasoning_plan(plan: str, ready: bool = True): # noqa: N802 """Return the reasoning plan result in JSON string form.""" return json.dumps({"plan": plan, "ready": ready})