feat:Strip code blocks in plan data. (#738)

* feat:Strip code blocks in plan data.

* feat: add repair_json_output for current_plan_content

---------

Co-authored-by: ryan-gz <ryzhangga1991@gmail.com>
This commit is contained in:
zhangga 2025-12-04 23:04:29 +08:00 committed by GitHub
parent c36ab393f1
commit bd6c50de33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -468,7 +468,7 @@ def human_feedback_node(
# increment the plan iterations
plan_iterations += 1
# parse the plan
new_plan = json.loads(current_plan_content)
new_plan = json.loads(repair_json_output(current_plan_content))
# Validate and fix plan to ensure web search requirements are met
configurable = Configuration.from_runnable_config(config)
new_plan = validate_and_fix_plan(new_plan, configurable.enforce_web_search)
@ -1233,4 +1233,4 @@ async def analyst_node(
config,
"analyst",
[], # No tools - pure reasoning
)
)