[Bug] V4.25.2版本 普通配置项上下文截断失效
What happened / 发生了什么
升级到最新4.25.2版本后,普通配置项里的上下文策略选择“按上下文截断”功能无法正常工作,无法截断超出设定的“最多保留对话轮数“的聊天记录。
Reproduce / 如何复现?
升级到4.25.2后就无法截断,回退到4.25.1后又能正常截断;再次升级到4.25.2后依然无法截断。
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
AstrBot 版本:4.25.2 部署方式: Docker 使用的提供商:deepseek-v4-flash 使用的消息平台适配器:qq_official
OS
Linux
Logs / 报错日志
[2026-06-02 00:47:22.153] [Core]
[INFO]
[AstrBot.main:96]: WebUI is up to date.
[2026-06-02 00:47:22.153] [Core]
[INFO]
[AstrBot.main:132]:
___ _... . ______ .___________.
/ \ / | || _ \ | _ \ / __ \ | |
/ ^ \ | (-------| |----| |) | | |) | | | | | ---| |----
/ /\ \ \ \ | | | / | _ < | | | | | |
/ _____ \ .----) | | | | |\ ----.| |) | | --' | | | /__/ \__\ |_______/ |__| | _| .||/ ____/ ||
[2026-06-02 00:47:22.153] [Core] [DBUG] [core.core_lifecycle:81]: HTTP proxy cleared
[2026-06-02 00:47:22.153] [Core]
[INFO]
[core.core_lifecycle:148]: AstrBot v4.25.2
[2026-06-02 00:47:22.247] [Core]
[INFO]
[core.persona_mgr:38]: Loaded 6 personas.
[2026-06-02 00:47:22.261] [Core]
[INFO]
[star.star_manager:285]: 插件 astrbot_plugin_rg 未找到 main.py 或者 astrbot_plugin_rg.py,跳过。
[2026-06-02 00:47:22.261] [Core]
[INFO]
[star.star_manager:285]: 插件 astrbot_plugin_llm_failover 未找到 main.py 或者 astrbot_plugin_llm_failover.py,跳过。
[2026-06-02 00:47:22.262] [Core]
[INFO]
[star.star_manager:953]: Loading plugin astrbot_plugin_essential ...
[2026-06-02 00:47:22.267] [Core]
[INFO]
[star.star_manager:1037]: Plugin astrbot_plugin_essential (v1.1.0) by Soulter,FateTrial: 支持多个娱乐功能!!随机动漫图片、以图搜番(适配手机QQ和微信)、MC服务器、一言、今天吃什么、群早晚安记录、EPIC喜加一。帮助:https://github.com/Soulter/astrbot_plugin_essential
[2026-06-02 00:47:22.268] [Core] [DBUG] [star.star_manager:1221]: 插入权限过滤器 admin 到 astrbot_plugin_essential 的 mcs 方法。
[2026-06-02 00:47:22.268] [Core]
[INFO]
[star.star_manager:953]: Loading plugin astrbot_plugin_sensoji ...
[2026-06-02 00:47:22.278] [Core]
[INFO]
[provider.func_tool_manager:314]: Added llm tool: explain_fortune
[2026-06-02 00:47:22.279] [Core]
[INFO]
[star.star_manager:1037]: Plugin astrbot_plugin_sensoji (v1.2.5) by Shouugou: 这是一个浅草寺抽签插件,模拟日本浅草寺的抽签功能。
[2026-06-02 00:47:22.280] [Core]
[INFO]
[star.star_manager:953]: Loading plugin astrbot_plugin_nachoneko ...
[2026-06-02 00:47:22.281] [Core]
[INFO]
[star.star_manager:1037]: Plugin nachoneko (v1.0.2) by Rinyin: 获取甘城猫猫图片。
[2026-06-02 00:47:22.281] [Core]
[INFO]
[star.star_manager:953]: Loading plugin astrbot_plugin_livingmemory ...
[2026-06-02 00:47:22.691] [Core]
[INFO]
[star.star_manager:1037]: Plugin astrbot_plugin_livingmemory (2.2.10) by lxfight: 为 AstrBot 打造的、拥有完整记忆生命周期的智能长期记忆插件。(v2.0重构版)
[2026-06-02 00:47:22.854] [Plug] [DBUG] [base.config_validator:279]: 配置已与默认值合并
[2026-06-02 00:47:22.854] [Plug]
[INFO]
[base.config_validator:235]: 配置验证成功
[2026-06-02 00:47:22.854] [Core] [DBUG] [star.star_manager:1221]: 插入权限过滤器 admin 到 astrbot_plugin_livingmemory 的 status 方法。
[2026-06-02 00:47:22.854] [Core] [DBUG] [star.star_manager:1221]: 插入权限过滤器 admin 到 astrbot_plugin_livingmemory 的 lmem 方法。
[2026-06-02 00:47:22.854] [Core]
[INFO]
[star.star_manager:953]: Loading plugin astrbot_plugin_tarot ...
[2026-06-02 00:47:23.045] [Core]
[WARN]
[v4.25.2] [star.star_manager:1021]: 插件 astrbot_plugin_tarot 元数据载入失败: while parsing a block mapping
in "/AstrBot/data/plugins/astrbot_plugin_tarot/metadata.yaml", line 1, column 1
expected
➜ Local: http://localhost:6185 ➜ Network: http://127.0.0.1:6185 ➜ Network: http://172.19.0.3:6185 ➜ Username: bidou ✨✨✨ [2026-06-02 00:47:25.580] [Core] [INFO] [utils.webhook_utils:66]:
🔗 机器人平台 wecom-app(企业微信) 已启用统一 Webhook 模式
📍 Webhook 回调地址:
➜ http://:6185/api/platform/webhook/a1a4e3d43d084801
➜ http://localhost:6185/api/platform/webhook/a1a4e3d43d084801
[2026-06-02 00:47:25.584] [Core] [INFO] [core.core_lifecycle:341]: AstrBot started. [2026-06-02 00:47:25.586] [Core] [INFO] [utils.temp_dir_cleaner:127]: TempDirCleaner started. interval=600s cleanup_ratio=0.3 [2026-06-02 00:47:25.595] [Core] [INFO] [t2i.network_strategy:131]: Successfully got 2 official T2I endpoints. [2026-06-02 00:47:25.630] [Plug] [INFO] [core.plugin_initializer:134]: Provider check passed: embedding and llm providers are ready. [2026-06-02 00:47:25.630] [Plug] [INFO] [core.plugin_initializer:296]: 开始完整初始化流程... [2026-06-02 00:47:25.645] [Plug] [INFO] [core.plugin_initializer:331]: 数据库已初始化。数据目录: /AstrBot/data/plugin_data/astrbot_plugin_livingmemory [2026-06-02 00:47:25.646] [Plug] [INFO] [storage.db_migration:92]: 当前数据库版本: 6 [2026-06-02 00:47:25.646] [Plug] [INFO] [storage.db_migration:161]: 数据库版本最新: v6 [2026-06-02 00:47:25.646] [Plug] [INFO] [core.plugin_initializer:502]: 数据库版本已是最新,无需迁移 [2026-06-02 00:47:25.653] [Plug] [INFO] [core.plugin_initializer:421]: MemoryEngine 已初始化 [2026-06-02 00:47:25.655] [Plug] [INFO] [storage.conversation_store:48]: [ConversationStore] 数据库初始化完成: /AstrBot/data/plugin_data/astrbot_plugin_livingmemory/conversations.db [2026-06-02 00:47:25.655] [Plug] [INFO] [managers.conversation_manager:66]: [ConversationManager] 初始化完成: 缓存大小=100, 上下文窗口=6 [2026-06-02 00:47:25.655] [Plug] [INFO] [core.plugin_initializer:435]: ConversationManager 已初始化 [2026-06-02 00:47:25.656] [Plug] [INFO] [core.plugin_initializer:578]: 开始检查并修复 message_count 一致性。 [2026-06-02 00:47:25.704] [Plug] [INFO] [storage.conversation_store:784]: [ConversationStore] 所有会话的 message_count 均正确,无需修复 [2026-06-02 00:47:25.704] [Plug] [DBUG] [core.plugin_initializer:584]: 所有会话的 message_count 均正确 [2026-06-02 00:47:25.704] [Plug] [INFO] [processors.memory_processor:55]: [MemoryProcessor] 提示词模板加载成功 [2026-06-02 00:47:25.704] [Plug] [INFO] [core.plugin_initializer:444]: MemoryProcessor 已初始化 [2026-06-02 00:47:25.708] [Plug] [INFO] [core.plugin_initializer:570]: 索引一致性检查通过: 向量索引含277条冗余槽位(正常,不影响召回) [2026-06-02 00:47:25.791] [Plug] [INFO] [core.plugin_initializer:456]: TextProcessor 停用词已加载 [2026-06-02 00:47:25.792] [Plug] [DBUG] [schedulers.decay_scheduler:180]: [衰减调度] 今日已执行过衰减,跳过 [2026-06-02 00:47:25.792] [Plug] [INFO] [schedulers.decay_scheduler:278]: [衰减调度] 调度器已启动 (衰减率: 0.01, 执行时间: 00:05) [2026-06-02 00:47:25.792] [Plug] [INFO] [core.plugin_initializer:480]: DecayScheduler 已启动 [2026-06-02 00:47:25.793] [Plug] [INFO] [core.plugin_initializer:484]: LivingMemory 插件初始化成功。 [2026-06-02 00:47:25.800] [Core] [INFO] [star.context:506]: plugin(module_path data.plugins.astrbot_plugin_livingmemory.main) added LLM tool: recall_long_term_memory [2026-06-02 00:47:25.800] [Plug] [DBUG] [schedulers.decay_scheduler:251]: [衰减调度] 下次执行在 23.3 小时后 [2026-06-02 00:47:25.937] [Core] [INFO] [qqofficial.qqofficial_platform_adapter:131]: [QQOfficial] Websocket session starting. [2026-06-02 00:47:25.979] [Core] [DBUG] [wecom.wecom_adapter:321]: 获取到微信客服列表: [{'open_kfid': 'wkLByYQwAAoJXHrjey-7pdmypibYRGAg', 'name': 'Arona客服', 'avatar': 'https://wwcdn.weixin.qq.com/node/wework/images/kf_head_image_url_3.png'}, {'open_kfid': 'wkLByYQwAAMIBRCLd0-3hZEpbyfAE2EQ', 'name': 'Arona', 'avatar': 'https://wework.qpic.cn/wwpic3az/820727_yEmB8aFFTnSDwGx_1747742464/0'}] [2026-06-02 00:47:25.980] [Core] [DBUG] [wecom.wecom_adapter:329]: Found open_kfid: wkLByYQwAAMIBRCLd0-3hZEpbyfAE2EQ [2026-06-02 00:47:26.070] [Core] [INFO] [qqofficial.qqofficial_platform_adapter:131]: [QQOfficial] Websocket session starting. [2026-06-02 00:47:26.125] [Core] [INFO] [wecom.wecom_adapter:338]: 请打开以下链接,在微信扫码以获取客服微信: https://api.cl2wm.cn/api/qrcode/code? [2026-06-02 00:47:26.125] [Core] [INFO] [utils.webhook_utils:66]:
🔗 机器人平台 wecom-service(企业微信) 已启用统一 Webhook 模式
📍 Webhook 回调地址:
➜ http://:6185/api/platform/webhook/d61175a9bc604552
➜ http://localhost:6185/api/platform/webhook/d61175a9bc604552
[2026-06-02 00:47:26.874] [Core] [INFO] [utils.llm_metadata:63]: Successfully fetched metadata for 2549 LLMs. [2026-06-02 00:47:36.804] [Core] [INFO] [core.event_bus:66]: [default] [小叶子(qq_official)] D0919CDB7D47B537A91CF95F357DDF18: [At:qq_official] /persona [2026-06-02 00:47:36.804] [Core] [DBUG] [waking_check.stage:158]: enabled_plugins_name: ['qq_official_url_cleaner', 'nachoneko', 'mccloud_img', 'astrbot_plugin_yunshi', 'astrbot_plugin_sensoji', 'astrbot_plugin_essential', 'astrbot_plugin_doro', 'astrbot_mcgetter', 'astrbit_plugin_maodie', 'astrbot_plugin_office_assistant', 'blue_archive', 'tarot'] [2026-06-02 00:47:36.813] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_session_control_agent [2026-06-02 00:47:36.814] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_empty_mention [2026-06-02 00:47:36.814] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot_plugin_essential - handle_search_anime [2026-06-02 00:47:36.814] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - on_message [2026-06-02 00:47:36.818] [Core] [DBUG] [agent_sub_stages.internal:189]: ready to request llm provider [2026-06-02 00:47:36.818] [Core] [DBUG] [agent_sub_stages.internal:212]: acquired session lock for llm request [2026-06-02 00:47:36.871] [Core] [DBUG] [pipeline.context_utils:95]: hook(OnLLMRequestEvent) -> astrbot - decorate_llm_req [2026-06-02 00:47:37.007] [Core] [INFO] [respond.stage:183]: Prepare to send - /D0919CDB7D47B537A91CF95F357DDF18: [2026-06-02 00:47:37.007] [Core] [INFO] [respond.stage:199]: 应用流式输出(小叶子) [2026-06-02 00:47:37.008] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.IDLE -> AgentState.RUNNING [2026-06-02 00:47:37.008] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [BefCompact] RunCtx.messages -> [10] system,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:47:37.008] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [AftCompact] RunCtx.messages -> [10] system,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:47:38.254] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8lRfevfPLKJ7KlZr3CC9.m7W43pH7nJX6vEIwkCoaLwTWBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:47:38+08:00', 'ext_info': {'ref_idx': 'REFIDX_MFAKsSJPSLY2ODc2VIgxdg=='}} [2026-06-02 00:47:39.430] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8lRfevfPLKJ7KlZr3CC9.m7W43pH7nJX6vEIwkCoaLwTWBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:47:39+08:00', 'ext_info': {'ref_idx': 'REFIDX_MFAKsSJPSLY2ODc2VIgxdg=='}} [2026-06-02 00:47:40.680] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8lRfevfPLKJ7KlZr3CC9.m7W43pH7nJX6vEIwkCoaLwTWBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:47:40+08:00', 'ext_info': {'ref_idx': 'REFIDX_MFAKsSJPSLY2ODc2VIgxdg=='}} [2026-06-02 00:47:40.693] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.RUNNING -> AgentState.DONE [2026-06-02 00:47:40.880] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8lRfevfPLKJ7KlZr3CC9.m7W43pH7nJX6vEIwkCoaLwTWBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:47:40+08:00', 'ext_info': {'ref_idx': 'REFIDX_MFAKsSJPSLY2ODc2VIgxdg=='}} [2026-06-02 00:47:40.901] [Core] [DBUG] [result_decorate.stage:165]: hook(on_decorating_result) -> qq_official_url_cleaner - helloworld [2026-06-02 00:47:40.901] [Core] [WARN] [v4.25.2] [result_decorate.stage:169]: 启用流式输出时,依赖发送消息前事件钩子的插件可能无法正常工作 [2026-06-02 00:47:40.901] [Core] [INFO] [result_decorate.stage:189]: 流式输出已启用,跳过结果装饰阶段 [2026-06-02 00:47:40.901] [Core] [DBUG] [pipeline.scheduler:93]: pipeline 执行完毕。 [2026-06-02 00:47:51.914] [Core] [INFO] [core.event_bus:66]: [default] [小叶子(qq_official)] D0919CDB7D47B537A91CF95F357DDF18: [At:qq_official] /delete [2026-06-02 00:47:51.914] [Core] [DBUG] [waking_check.stage:158]: enabled_plugins_name: ['qq_official_url_cleaner', 'nachoneko', 'mccloud_img', 'astrbot_plugin_yunshi', 'astrbot_plugin_sensoji', 'astrbot_plugin_essential', 'astrbot_plugin_doro', 'astrbot_mcgetter', 'astrbit_plugin_maodie', 'astrbot_plugin_office_assistant', 'blue_archive', 'tarot'] [2026-06-02 00:47:51.923] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_session_control_agent [2026-06-02 00:47:51.923] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_empty_mention [2026-06-02 00:47:51.924] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot_plugin_essential - handle_search_anime [2026-06-02 00:47:51.924] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - on_message [2026-06-02 00:47:51.928] [Core] [DBUG] [agent_sub_stages.internal:189]: ready to request llm provider [2026-06-02 00:47:51.928] [Core] [DBUG] [agent_sub_stages.internal:212]: acquired session lock for llm request [2026-06-02 00:47:51.941] [Core] [DBUG] [pipeline.context_utils:95]: hook(OnLLMRequestEvent) -> astrbot - decorate_llm_req [2026-06-02 00:47:52.085] [Core] [INFO] [respond.stage:183]: Prepare to send - /D0919CDB7D47B537A91CF95F357DDF18: [2026-06-02 00:47:52.086] [Core] [INFO] [respond.stage:199]: 应用流式输出(小叶子) [2026-06-02 00:47:52.086] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.IDLE -> AgentState.RUNNING [2026-06-02 00:47:52.086] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [BefCompact] RunCtx.messages -> [12] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:47:52.086] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [AftCompact] RunCtx.messages -> [12] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:47:54.072] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8ru61MuRpz2wGRGiyMF5ElHE6EaC-u2UJxvCj-qhFnJZB-cUieETzxjGl3ja1g71tg!!', 'timestamp': '2026-06-02T00:47:53+08:00', 'ext_info': {'ref_idx': 'REFIDX_5suVzMy8qTIzLr/EDyb1vA=='}} [2026-06-02 00:47:55.247] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8ru61MuRpz2wGRGiyMF5ElHE6EaC-u2UJxvCj-qhFnJZB-cUieETzxjGl3ja1g71tg!!', 'timestamp': '2026-06-02T00:47:55+08:00', 'ext_info': {'ref_idx': 'REFIDX_5suVzMy8qTIzLr/EDyb1vA=='}} [2026-06-02 00:47:55.252] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.RUNNING -> AgentState.DONE [2026-06-02 00:47:55.403] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8ru61MuRpz2wGRGiyMF5ElHE6EaC-u2UJxvCj-qhFnJZB-cUieETzxjGl3ja1g71tg!!', 'timestamp': '2026-06-02T00:47:55+08:00', 'ext_info': {'ref_idx': 'REFIDX_5suVzMy8qTIzLr/EDyb1vA=='}} [2026-06-02 00:47:55.432] [Core] [DBUG] [result_decorate.stage:165]: hook(on_decorating_result) -> qq_official_url_cleaner - helloworld [2026-06-02 00:47:55.432] [Core] [WARN] [v4.25.2] [result_decorate.stage:169]: 启用流式输出时,依赖发送消息前事件钩子的插件可能无法正常工作 [2026-06-02 00:47:55.432] [Core] [INFO] [result_decorate.stage:189]: 流式输出已启用,跳过结果装饰阶段 [2026-06-02 00:47:55.432] [Core] [DBUG] [pipeline.scheduler:93]: pipeline 执行完毕。 [2026-06-02 00:48:16.091] [Core] [INFO] [core.event_bus:66]: [default] [小叶子(qq_official)] D0919CDB7D47B537A91CF95F357DDF18: [At:qq_official] 1 [2026-06-02 00:48:16.091] [Core] [DBUG] [waking_check.stage:158]: enabled_plugins_name: ['qq_official_url_cleaner', 'nachoneko', 'mccloud_img', 'astrbot_plugin_yunshi', 'astrbot_plugin_sensoji', 'astrbot_plugin_essential', 'astrbot_plugin_doro', 'astrbot_mcgetter', 'astrbit_plugin_maodie', 'astrbot_plugin_office_assistant', 'blue_archive', 'tarot'] [2026-06-02 00:48:16.100] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_session_control_agent [2026-06-02 00:48:16.100] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_empty_mention [2026-06-02 00:48:16.100] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot_plugin_essential - handle_search_anime [2026-06-02 00:48:16.100] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - on_message [2026-06-02 00:48:16.105] [Core] [DBUG] [agent_sub_stages.internal:189]: ready to request llm provider [2026-06-02 00:48:16.105] [Core] [DBUG] [agent_sub_stages.internal:212]: acquired session lock for llm request [2026-06-02 00:48:16.119] [Core] [DBUG] [pipeline.context_utils:95]: hook(OnLLMRequestEvent) -> astrbot - decorate_llm_req [2026-06-02 00:48:16.253] [Core] [INFO] [respond.stage:183]: Prepare to send - /D0919CDB7D47B537A91CF95F357DDF18: [2026-06-02 00:48:16.254] [Core] [INFO] [respond.stage:199]: 应用流式输出(小叶子) [2026-06-02 00:48:16.255] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.IDLE -> AgentState.RUNNING [2026-06-02 00:48:16.255] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [BefCompact] RunCtx.messages -> [14] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:48:16.255] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [AftCompact] RunCtx.messages -> [14] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:48:17.729] [Core] [WARN] [v4.25.2] [qqofficial.qqofficial_message_event:502]: [QQOfficial] 流式 markdown 分片换行校验失败,已修正后重试一次。 [2026-06-02 00:48:17.919] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8hCbm3O3Vm9uVzeqHQDgZjytPdPwpTobfuAh2169qDomWBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:48:17+08:00', 'ext_info': {'ref_idx': 'REFIDX_VZM61OMgBZRf4Gsw++QUbQ=='}} [2026-06-02 00:48:19.117] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8hCbm3O3Vm9uVzeqHQDgZjytPdPwpTobfuAh2169qDomWBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:48:19+08:00', 'ext_info': {'ref_idx': 'REFIDX_VZM61OMgBZRf4Gsw++QUbQ=='}} [2026-06-02 00:48:19.126] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.RUNNING -> AgentState.DONE [2026-06-02 00:48:19.270] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8hCbm3O3Vm9uVzeqHQDgZjytPdPwpTobfuAh2169qDomWBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:48:19+08:00', 'ext_info': {'ref_idx': 'REFIDX_VZM61OMgBZRf4Gsw++QUbQ=='}} [2026-06-02 00:48:19.287] [Core] [DBUG] [result_decorate.stage:165]: hook(on_decorating_result) -> qq_official_url_cleaner - helloworld [2026-06-02 00:48:19.287] [Core] [WARN] [v4.25.2] [result_decorate.stage:169]: 启用流式输出时,依赖发送消息前事件钩子的插件可能无法正常工作 [2026-06-02 00:48:19.287] [Core] [INFO] [result_decorate.stage:189]: 流式输出已启用,跳过结果装饰阶段 [2026-06-02 00:48:19.288] [Core] [DBUG] [pipeline.scheduler:93]: pipeline 执行完毕。 [2026-06-02 00:48:24.153] [Core] [INFO] [core.event_bus:66]: [default] [小叶子(qq_official)] D0919CDB7D47B537A91CF95F357DDF18: [At:qq_official] 1 [2026-06-02 00:48:24.153] [Core] [DBUG] [waking_check.stage:158]: enabled_plugins_name: ['qq_official_url_cleaner', 'nachoneko', 'mccloud_img', 'astrbot_plugin_yunshi', 'astrbot_plugin_sensoji', 'astrbot_plugin_essential', 'astrbot_plugin_doro', 'astrbot_mcgetter', 'astrbit_plugin_maodie', 'astrbot_plugin_office_assistant', 'blue_archive', 'tarot'] [2026-06-02 00:48:24.163] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_session_control_agent [2026-06-02 00:48:24.163] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_empty_mention [2026-06-02 00:48:24.163] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot_plugin_essential - handle_search_anime [2026-06-02 00:48:24.164] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - on_message [2026-06-02 00:48:24.168] [Core] [DBUG] [agent_sub_stages.internal:189]: ready to request llm provider [2026-06-02 00:48:24.168] [Core] [DBUG] [agent_sub_stages.internal:212]: acquired session lock for llm request [2026-06-02 00:48:24.181] [Core] [DBUG] [pipeline.context_utils:95]: hook(OnLLMRequestEvent) -> astrbot - decorate_llm_req [2026-06-02 00:48:24.317] [Core] [INFO] [respond.stage:183]: Prepare to send - /D0919CDB7D47B537A91CF95F357DDF18: [2026-06-02 00:48:24.317] [Core] [INFO] [respond.stage:199]: 应用流式输出(小叶子) [2026-06-02 00:48:24.317] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.IDLE -> AgentState.RUNNING [2026-06-02 00:48:24.317] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [BefCompact] RunCtx.messages -> [16] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:48:24.318] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [AftCompact] RunCtx.messages -> [16] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:48:25.793] [Core] [WARN] [v4.25.2] [qqofficial.qqofficial_message_event:502]: [QQOfficial] 流式 markdown 分片换行校验失败,已修正后重试一次。 [2026-06-02 00:48:25.986] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8uQE2MKt8hpQJYXd5eOhnhwIiRKK4xliXsoNrqo7Fzj0-Rn8tUQdFAh1Qj4ff2alwg!!', 'timestamp': '2026-06-02T00:48:25+08:00', 'ext_info': {'ref_idx': 'REFIDX_/oaYh98WbmojS7G3u+91astG81ovPjw88HwjHppK6Gc='}} [2026-06-02 00:48:27.166] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8uQE2MKt8hpQJYXd5eOhnhwIiRKK4xliXsoNrqo7Fzj0-Rn8tUQdFAh1Qj4ff2alwg!!', 'timestamp': '2026-06-02T00:48:27+08:00', 'ext_info': {'ref_idx': 'REFIDX_/oaYh98WbmojS7G3u+91astG81ovPjw88HwjHppK6Gc='}} [2026-06-02 00:48:27.480] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.RUNNING -> AgentState.DONE [2026-06-02 00:48:27.631] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8uQE2MKt8hpQJYXd5eOhnhwIiRKK4xliXsoNrqo7Fzj0-Rn8tUQdFAh1Qj4ff2alwg!!', 'timestamp': '2026-06-02T00:48:27+08:00', 'ext_info': {'ref_idx': 'REFIDX_/oaYh98WbmojS7G3u+91astG81ovPjw88HwjHppK6Gc='}} [2026-06-02 00:48:27.649] [Core] [DBUG] [result_decorate.stage:165]: hook(on_decorating_result) -> qq_official_url_cleaner - helloworld [2026-06-02 00:48:27.649] [Core] [WARN] [v4.25.2] [result_decorate.stage:169]: 启用流式输出时,依赖发送消息前事件钩子的插件可能无法正常工作 [2026-06-02 00:48:27.649] [Core] [INFO] [result_decorate.stage:189]: 流式输出已启用,跳过结果装饰阶段 [2026-06-02 00:48:27.649] [Core] [DBUG] [pipeline.scheduler:93]: pipeline 执行完毕。 [2026-06-02 00:48:47.311] [Core] [INFO] [core.event_bus:66]: [default] [小叶子(qq_official)] D0919CDB7D47B537A91CF95F357DDF18: [At:qq_official] 1 [2026-06-02 00:48:47.312] [Core] [DBUG] [waking_check.stage:158]: enabled_plugins_name: ['qq_official_url_cleaner', 'nachoneko', 'mccloud_img', 'astrbot_plugin_yunshi', 'astrbot_plugin_sensoji', 'astrbot_plugin_essential', 'astrbot_plugin_doro', 'astrbot_mcgetter', 'astrbit_plugin_maodie', 'astrbot_plugin_office_assistant', 'blue_archive', 'tarot'] [2026-06-02 00:48:47.320] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_session_control_agent [2026-06-02 00:48:47.321] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_empty_mention [2026-06-02 00:48:47.321] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot_plugin_essential - handle_search_anime [2026-06-02 00:48:47.321] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - on_message [2026-06-02 00:48:47.325] [Core] [DBUG] [agent_sub_stages.internal:189]: ready to request llm provider [2026-06-02 00:48:47.325] [Core] [DBUG] [agent_sub_stages.internal:212]: acquired session lock for llm request [2026-06-02 00:48:47.339] [Core] [DBUG] [pipeline.context_utils:95]: hook(OnLLMRequestEvent) -> astrbot - decorate_llm_req [2026-06-02 00:48:47.474] [Core] [INFO] [respond.stage:183]: Prepare to send - /D0919CDB7D47B537A91CF95F357DDF18: [2026-06-02 00:48:47.474] [Core] [INFO] [respond.stage:199]: 应用流式输出(小叶子) [2026-06-02 00:48:47.475] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.IDLE -> AgentState.RUNNING [2026-06-02 00:48:47.475] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [BefCompact] RunCtx.messages -> [18] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:48:47.475] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [AftCompact] RunCtx.messages -> [18] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:48:49.460] [Core] [WARN] [v4.25.2] [qqofficial.qqofficial_message_event:502]: [QQOfficial] 流式 markdown 分片换行校验失败,已修正后重试一次。 [2026-06-02 00:48:49.672] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8gmf.yVrAl.5.cqdlPeiTH9rrx5B2C4.m29uDV9KisFdB-cUieETzxjGl3ja1g71tg!!', 'timestamp': '2026-06-02T00:48:49+08:00', 'ext_info': {'ref_idx': 'REFIDX_PyG8dmWtSnx8shnooNrqZQ=='}} [2026-06-02 00:48:50.831] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8gmf.yVrAl.5.cqdlPeiTH9rrx5B2C4.m29uDV9KisFdB-cUieETzxjGl3ja1g71tg!!', 'timestamp': '2026-06-02T00:48:50+08:00', 'ext_info': {'ref_idx': 'REFIDX_PyG8dmWtSnx8shnooNrqZQ=='}} [2026-06-02 00:48:51.645] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.RUNNING -> AgentState.DONE [2026-06-02 00:48:51.791] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8gmf.yVrAl.5.cqdlPeiTH9rrx5B2C4.m29uDV9KisFdB-cUieETzxjGl3ja1g71tg!!', 'timestamp': '2026-06-02T00:48:51+08:00', 'ext_info': {'ref_idx': 'REFIDX_PyG8dmWtSnx8shnooNrqZQ=='}} [2026-06-02 00:48:51.816] [Core] [DBUG] [result_decorate.stage:165]: hook(on_decorating_result) -> qq_official_url_cleaner - helloworld [2026-06-02 00:48:51.816] [Core] [WARN] [v4.25.2] [result_decorate.stage:169]: 启用流式输出时,依赖发送消息前事件钩子的插件可能无法正常工作 [2026-06-02 00:48:51.816] [Core] [INFO] [result_decorate.stage:189]: 流式输出已启用,跳过结果装饰阶段 [2026-06-02 00:48:51.816] [Core] [DBUG] [pipeline.scheduler:93]: pipeline 执行完毕。 [2026-06-02 00:49:06.437] [Core] [INFO] [core.event_bus:66]: [default] [小叶子(qq_official)] D0919CDB7D47B537A91CF95F357DDF18: [At:qq_official] 1 [2026-06-02 00:49:06.437] [Core] [DBUG] [waking_check.stage:158]: enabled_plugins_name: ['qq_official_url_cleaner', 'nachoneko', 'mccloud_img', 'astrbot_plugin_yunshi', 'astrbot_plugin_sensoji', 'astrbot_plugin_essential', 'astrbot_plugin_doro', 'astrbot_mcgetter', 'astrbit_plugin_maodie', 'astrbot_plugin_office_assistant', 'blue_archive', 'tarot'] [2026-06-02 00:49:06.445] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_session_control_agent [2026-06-02 00:49:06.446] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_empty_mention [2026-06-02 00:49:06.446] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot_plugin_essential - handle_search_anime [2026-06-02 00:49:06.446] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - on_message [2026-06-02 00:49:06.450] [Core] [DBUG] [agent_sub_stages.internal:189]: ready to request llm provider [2026-06-02 00:49:06.450] [Core] [DBUG] [agent_sub_stages.internal:212]: acquired session lock for llm request [2026-06-02 00:49:06.464] [Core] [DBUG] [pipeline.context_utils:95]: hook(OnLLMRequestEvent) -> astrbot - decorate_llm_req [2026-06-02 00:49:06.603] [Core] [INFO] [respond.stage:183]: Prepare to send - /D0919CDB7D47B537A91CF95F357DDF18: [2026-06-02 00:49:06.603] [Core] [INFO] [respond.stage:199]: 应用流式输出(小叶子) [2026-06-02 00:49:06.603] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.IDLE -> AgentState.RUNNING [2026-06-02 00:49:06.603] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [BefCompact] RunCtx.messages -> [20] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:49:06.604] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [AftCompact] RunCtx.messages -> [20] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:49:07.954] [Core] [WARN] [v4.25.2] [qqofficial.qqofficial_message_event:502]: [QQOfficial] 流式 markdown 分片换行校验失败,已修正后重试一次。 [2026-06-02 00:49:08.148] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8gRxGdj2CdMXnrNZ0zQ19pvqCY4EuENS0tc6P4XkrZM1WBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:49:08+08:00', 'ext_info': {'ref_idx': 'REFIDX_xEEwwv+RLOxsGnuQ12Tb9g=='}} [2026-06-02 00:49:09.331] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8gRxGdj2CdMXnrNZ0zQ19pvqCY4EuENS0tc6P4XkrZM1WBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:49:09+08:00', 'ext_info': {'ref_idx': 'REFIDX_xEEwwv+RLOxsGnuQ12Tb9g=='}} [2026-06-02 00:49:09.460] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.RUNNING -> AgentState.DONE [2026-06-02 00:49:09.621] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8gRxGdj2CdMXnrNZ0zQ19pvqCY4EuENS0tc6P4XkrZM1WBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:49:09+08:00', 'ext_info': {'ref_idx': 'REFIDX_xEEwwv+RLOxsGnuQ12Tb9g=='}} [2026-06-02 00:49:09.639] [Core] [DBUG] [result_decorate.stage:165]: hook(on_decorating_result) -> qq_official_url_cleaner - helloworld [2026-06-02 00:49:09.639] [Core] [WARN] [v4.25.2] [result_decorate.stage:169]: 启用流式输出时,依赖发送消息前事件钩子的插件可能无法正常工作 [2026-06-02 00:49:09.639] [Core] [INFO] [result_decorate.stage:189]: 流式输出已启用,跳过结果装饰阶段 [2026-06-02 00:49:09.640] [Core] [DBUG] [pipeline.scheduler:93]: pipeline 执行完毕。 [2026-06-02 00:49:13.998] [Core] [INFO] [core.event_bus:66]: [default] [小叶子(qq_official)] D0919CDB7D47B537A91CF95F357DDF18: [At:qq_official] 1 [2026-06-02 00:49:13.998] [Core] [DBUG] [waking_check.stage:158]: enabled_plugins_name: ['qq_official_url_cleaner', 'nachoneko', 'mccloud_img', 'astrbot_plugin_yunshi', 'astrbot_plugin_sensoji', 'astrbot_plugin_essential', 'astrbot_plugin_doro', 'astrbot_mcgetter', 'astrbit_plugin_maodie', 'astrbot_plugin_office_assistant', 'blue_archive', 'tarot'] [2026-06-02 00:49:14.007] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_session_control_agent [2026-06-02 00:49:14.007] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - handle_empty_mention [2026-06-02 00:49:14.008] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot_plugin_essential - handle_search_anime [2026-06-02 00:49:14.008] [Core] [DBUG] [method.star_request:46]: plugin -> astrbot - on_message [2026-06-02 00:49:14.012] [Core] [DBUG] [agent_sub_stages.internal:189]: ready to request llm provider [2026-06-02 00:49:14.012] [Core] [DBUG] [agent_sub_stages.internal:212]: acquired session lock for llm request [2026-06-02 00:49:14.026] [Core] [DBUG] [pipeline.context_utils:95]: hook(OnLLMRequestEvent) -> astrbot - decorate_llm_req [2026-06-02 00:49:14.176] [Core] [INFO] [respond.stage:183]: Prepare to send - /D0919CDB7D47B537A91CF95F357DDF18: [2026-06-02 00:49:14.176] [Core] [INFO] [respond.stage:199]: 应用流式输出(小叶子) [2026-06-02 00:49:14.176] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.IDLE -> AgentState.RUNNING [2026-06-02 00:49:14.176] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [BefCompact] RunCtx.messages -> [22] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:49:14.176] [Core] [DBUG] [runners.tool_loop_agent_runner:615]: [AftCompact] RunCtx.messages -> [22] system,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user,assistant,user [2026-06-02 00:49:16.411] [Core] [WARN] [v4.25.2] [qqofficial.qqofficial_message_event:502]: [QQOfficial] 流式 markdown 分片换行校验失败,已修正后重试一次。 [2026-06-02 00:49:16.644] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8lU8GANCSJEpMBFY99n7KV95.8GfWuMqEk9T9H719SH.WBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:49:16+08:00', 'ext_info': {'ref_idx': 'REFIDX_ypfUCddQbnem3WeO8zllEg=='}} [2026-06-02 00:49:17.803] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8lU8GANCSJEpMBFY99n7KV95.8GfWuMqEk9T9H719SH.WBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:49:17+08:00', 'ext_info': {'ref_idx': 'REFIDX_ypfUCddQbnem3WeO8zllEg=='}} [2026-06-02 00:49:18.944] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8lU8GANCSJEpMBFY99n7KV95.8GfWuMqEk9T9H719SH.WBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:49:18+08:00', 'ext_info': {'ref_idx': 'REFIDX_ypfUCddQbnem3WeO8zllEg=='}} [2026-06-02 00:49:19.122] [Core] [DBUG] [runners.base:64]: Agent state transition: AgentState.RUNNING -> AgentState.DONE [2026-06-02 00:49:19.277] [Core] [DBUG] [qqofficial.qqofficial_message_event:438]: Message sent to C2C: {'id': 'ROBOT1.0_eXSa3DTYiC9GJI03hvFZ8lU8GANCSJEpMBFY99n7KV95.8GfWuMqEk9T9H719SH.WBG7GLnaJQRtHfP3c3dV1A!!', 'timestamp': '2026-06-02T00:49:19+08:00', 'ext_info': {'ref_idx': 'REFIDX_ypfUCddQbnem3WeO8zllEg=='}} [2026-06-02 00:49:19.303] [Core] [DBUG] [result_decorate.stage:165]: hook(on_decorating_result) -> qq_official_url_cleaner - helloworld [2026-06-02 00:49:19.303] [Core] [WARN] [v4.25.2] [result_decorate.stage:169]: 启用流式输出时,依赖发送消息前事件钩子的插件可能无法正常工作 [2026-06-02 00:49:19.304] [Core] [INFO] [result_decorate.stage:189]: 流式输出已启用,跳过结果装饰阶段 [2026-06-02 00:49:19.304] [Core] [DBUG] [pipeline.scheduler:93]: pipeline 执行完毕。
Are you willing to submit a PR? / 你愿意提交 PR 吗?
- [x] Yes!
Code of Conduct
- [x] I have read and agree to abide by the project's Code of Conduct。
Hi @bidouBD! I'm Dosu and I'm helping the AstrBotTeam team.
从你的日志中可以看到,[BefCompact] 和 [AftCompact] 显示的消息数完全一致(10→10, 12→12, 14→14...一直增长到22),这意味着上下文压缩/截断阶段实际上没有生效。
可能的原因:
这很可能与 v4.25.2 中合入的 PR #8226(长期记忆重构)引入的一个 JSON 序列化 bug 有关 [1]。当消息内容包含 Pydantic TextPart 对象时,rounds_to_text() 中调用 json.dumps() 会抛出 TypeError: Object of type TextPart is not JSON serializable [2],导致压缩流程异常退出,消息原样返回。
上下文截断是一个两阶段过程 [3]:
- 阶段一:按
enforce_max_turns强制截断轮次 - 阶段二:按 token 限制执行压缩策略
如果阶段一未配置(enforce_max_turns == -1),且阶段二因上述 bug 失败,就会出现你描述的"完全不截断"的现象。
临时解决方案:
- 检查配置中
enforce_max_turns是否设置为你期望的轮数值(而非-1) - 如果你使用的是"由LLM压缩"策略,尝试切换为 "按轮次截断"(
truncate_by_turns),可以绕过这个 JSON 序列化 bug - 检查完整日志中是否有
TypeError: Object of type TextPart is not JSON serializable的报错
相关 issue: #8484 报告了同版本下 LLM 压缩的 JSON 序列化问题 [1]。
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
补充:配置项参数为最多保留5轮对话,超过丢弃两轮,处理方式为按对话轮数截断。