mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 05:09:51 +08:00
When response_format is unsupported (e.g. deepseek), LLMs return JSON wrapped in markdown code fences (```json...```). Seven agent modules used raw json.loads() which fails on fenced responses. Replace with the existing parse_json_response() utility from deeptutor/utils/json_parser.py which handles: - Markdown code block extraction - json-repair fallback for malformed JSON - Graceful fallback on parse failure Affected modules: - agents/question/agents/idea_agent.py - agents/solve/agents/planner_agent.py - agents/guide/agents/design_agent.py - agents/research/utils/citation_manager.py (3 call sites) - agents/research/agents/reporting_agent.py - agents/research/agents/note_agent.py - agents/research/data_structures.py Closes #179