deerflow2/backend/packages/harness/deerflow/agents
d 🔹 77b8ef79ca
fix(middleware): use HumanMessage in LoopDetectionMiddleware for Anthropic compat (#1300)
LoopDetectionMiddleware injected SystemMessage mid-conversation to warn
about repetitive tool calls. This crashes Anthropic models because
langchain_anthropic's _format_messages() requires system messages to
appear only at the start of the conversation — interleaved system
messages raise 'Received multiple non-consecutive system messages'.

Switch the warning injection from SystemMessage to HumanMessage, which
works with all providers (Anthropic, OpenAI, Google, etc.).

Fixes #1299

Co-authored-by: voidborne-d <voidborne-d@users.noreply.github.com>
2026-03-25 08:00:01 +08:00
..
checkpointer fix: normalize structured LLM content in serialization and memory updater (#1215) 2026-03-22 17:29:29 +08:00
lead_agent feat(tools): add tool_search for deferred MCP tool loading (#1176) 2026-03-17 20:43:55 +08:00
memory fix: normalize structured LLM content in serialization and memory updater (#1215) 2026-03-22 17:29:29 +08:00
middlewares fix(middleware): use HumanMessage in LoopDetectionMiddleware for Anthropic compat (#1300) 2026-03-25 08:00:01 +08:00
__init__.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
thread_state.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00