Skip to content

feat: 低端模型容易卡循环,考虑接入 pi-anti-doom-loop #179

Description

@vastsa

背景

使用低端/小参数模型(如 qwen2.5-7b、llama3-8b 等)时,agent 有很大概率陷入工具调用死循环:

  • 反复调用同一个 tool 且参数不变
  • 盲目重试失败的工具调用
  • 一轮对话中无限产出中间文本却不推进任务

这会快速烧完 token,用户体验极差。

建议

社区已有 irfndi/pi-anti-doom-loop 插件,可以:

  • 检测并阻断重复的工具调用
  • 打断盲目的重试循环
  • 节省 token 消耗

是否考虑将其接入 PI-Desktop 作为内置或推荐的安全机制? 至少对低端模型默认开启。

复现方式

  1. 配置一个 7B 级别的本地模型
  2. 发起一个需要多步工具调用的任务
  3. 观察 agent 是否在某一步开始无限循环同一工具调用

影响

  • 低端模型用户 token 浪费严重
  • 任务无法完成,用户只能手动中断

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions