HKUDS/DeepTutor · error · ValueError
ReviewAgent repair prompts are not configured.
Error message
ReviewAgent repair prompts are not configured.
What it means
Raised in ReviewAgent.process when the repair prompts ('repair_system', 'repair_user_template') are not configured. The repair pass runs only after deterministic validation failed, so a missing prompt here aborts the fix cycle for a chart the validator already rejected.
Solutions
- Confirm repair_system and repair_user_template keys exist in the review agent's prompt config
- Repair/reinstall the prompts YAML for the visualize capability
- Optionally degrade gracefully: return the validation error to the user instead of crashing when prompts are absent
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at deeptutor/agents/visualize/agents/review_agent.py:48 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/1b133f7a03ca6385.
Report an issue: GitHub.
Appendix: source
Thrown at deeptutor/agents/visualize/agents/review_agent.py:48
async def process(
self,
*,
user_input: str,
analysis: VisualizationAnalysis,
code: str,
error: str,
) -> ReviewResult:
"""Targeted repair pass — this agent's single job.
Only invoked *after* the deterministic local validation has failed,
and handed the concrete error so the model fixes one specific defect
instead of re-judging everything (chat and Book share this path).
"""
system_prompt = self.get_prompt("repair_system")
user_template = self.get_prompt("repair_user_template")
if not system_prompt or not user_template:
raise ValueError("ReviewAgent repair prompts are not configured.")
user_prompt = user_template.format(
user_input=user_input.strip(),
render_type=analysis.render_type,
error=error.strip() or "(unspecified)",
analysis_json=json.dumps(analysis.model_dump(), ensure_ascii=False, indent=2),
code=code,
)
chunks: list[str] = []
async for chunk in self.stream_llm(
user_prompt=user_prompt,
system_prompt=system_prompt,
response_format={"type": "json_object"},
stage="reviewing",
trace_meta=build_trace_metadata(
call_id=new_call_id("viz-repair"),
phase="reviewing",View on GitHub (pinned to 3e82f13042)