DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.
Python ai-agentsai-tutorclawbotcli-tooldeepresearchinteractive-learninglearningmulti-agent-systemsrag
Merge PR #1962: count complete projected requests in context guard
Bingxi Zhao (Frank)e8c0b1eed564
diff --cc deeptutor/agents/loop/agent_loop.pyindex a287908a1,14defd0a5..9c80aed15--- a/deeptutor/agents/loop/agent_loop.py+++ b/deeptutor/agents/loop/agent_loop.py@@@ -1081,15 -1047,9 +1081,17 @@@ class AgentLooptool_choice: str | None = None,) -> LLMCallResult:request_messages = with_transient_model_messages(messages, self._transient_model_messages)+ # Guard the same request representation we send. Raw repeated images+ # must not cause tool evidence to be snipped before image projection.+ projected_messages = deduplicate_user_images(+ [+ {key: value for key, value in message.items() if key != "_context_snapshot"}+ for message in request_messages+ ]+ )- await self.pipeline._guard_context_window(projected_messages, self.stream)+ await self.pipeline._guard_context_window(- request_messages, self.stream, tool_schemas=tool_schemas++ projected_messages, self.stream, tool_schemas=tool_schemas+ )stage = self.stagecall_id = new_call_id(f"{self.source}-{stage}")trace_meta = build_trace_metadata(