Skip to content

Commit 451ad68

Browse files
authored
feat: 集成 DeerFlow Agent Runner 并优化流式处理 (#5581)
* feat: integrate DeerFlow agent runner and improve stream handling * refactor: split DeerFlow stream flow and close stale client on reset * fix: enforce max_step and correct timeout type check * fix: harden DeerFlow config parsing and session lifecycle * fix: preserve third-party runner error semantics and harden image parsing * perf: bound DeerFlow values history and seen-id cache * refactor: improve deerflow stream semantics and client lifecycle * fix: harden third-party runner error semantics and fallback aggregation * refactor: reduce deerflow image log noise and lazy-init api session * perf: avoid unnecessary iterable copies in deerflow stream utils * refactor: centralize runner error key and clarify deerflow client lifecycle * refactor: simplify third-party runner output flow * fix: defer streaming runner cleanup and unify error mapping * fix: handle id-less values messages and redact stream payload logs * fix: improve deerflow error signaling and third-party runner flow * fix: support deerflow proxy and refine runner lifecycle * fix: tighten deerflow image validation and runner lifecycle * feat: support deerflow image output components * fix: harden runner stream cleanup and refactor deerflow config * fix: preserve deerflow done hook and simplify runner lifecycle * refactor: simplify third-party runner aggregation and lifecycle closing * fix: preserve first deerflow values payload and simplify runner flow * refactor: unify runner final resolution and harden deerflow close state * refactor: share int coercion and make deerflow close best effort * refactor: extract deerflow mappers and streamline third-party lifecycle * refactor: simplify third-party flow and harden sse flush parsing * fix: make deerflow runner close path best effort * refactor: simplify third-party orchestration and centralize deerflow keys * refactor: simplify third-party chunk flow and deerflow finalization * fix: harden deerflow stream parsing and simplify runner lifecycle * refactor: remove redundant deerflow values text assignment * fix: improve deerflow timeout diagnostics and image input feedback * refactor: flatten third-party runner lifecycle and aggregation * chore: use deerflow official remote svg icon * chore: remove unused deerflow local logo asset
1 parent 93decaa commit 451ad68

16 files changed

Lines changed: 1849 additions & 66 deletions

File tree

astrbot/builtin_stars/builtin_commands/commands/conversation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
from astrbot.api import sp, star
44
from astrbot.api.event import AstrMessageEvent, MessageEventResult
5+
from astrbot.core.agent.runners.deerflow.constants import (
6+
DEERFLOW_PROVIDER_TYPE,
7+
DEERFLOW_THREAD_ID_KEY,
8+
)
59
from astrbot.core.platform.astr_message_event import MessageSession
610
from astrbot.core.platform.message_type import MessageType
711
from astrbot.core.utils.active_event_registry import active_event_registry
@@ -12,6 +16,7 @@
1216
"dify": "dify_conversation_id",
1317
"coze": "coze_conversation_id",
1418
"dashscope": "dashscope_conversation_id",
19+
DEERFLOW_PROVIDER_TYPE: DEERFLOW_THREAD_ID_KEY,
1520
}
1621
THIRD_PARTY_AGENT_RUNNER_STR = ", ".join(THIRD_PARTY_AGENT_RUNNER_KEY.keys())
1722

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DEERFLOW_PROVIDER_TYPE = "deerflow"
2+
DEERFLOW_THREAD_ID_KEY = "deerflow_thread_id"
3+
DEERFLOW_SESSION_PREFIX = "deerflow-ephemeral"
4+
DEERFLOW_AGENT_RUNNER_PROVIDER_ID_KEY = "deerflow_agent_runner_provider_id"

0 commit comments

Comments
 (0)