Skip to content

v1.5.4 persona 替换语义:与 dsh-routing-suite 的 applyPersona 对齐

Choose a tag to compare

@HengXin666 HengXin666 released this 15 Aug 11:01
· 7 commits to main since this release

🎯 本次修复:persona 从「前置」改为「替换」

重新审视了 dsh-routing-suite 的原始实现(applyPersona):它的语义是移除客户端 persona section、换成路由 persona,其余 section 全部保留

旧实现的问题:我们只在请求最前前置了一条 persona system 消息,客户端原本的 persona(如 "You are a coding agent powered by...")原样保留在后面——模型同时看到两个身份互相打架,路由效果被稀释,等于没改变实质。

新实现:移除客户端第一条 system 开头的 persona 段("You are..." 段落),换成路由 persona(free-mode 门禁标记保留在最前),其余 section(工具指导 / 工作区 / 回复格式)原样保留——与套件语义一致;无法识别 persona 段时回退为前置。

验证

  • 单元 + e2e:标准预设形态("You are a coding agent powered by...")被替换、"### " section 保留、消息数从 3 → 2;非 "You are" 开头回退前置 ✓
  • npm test / typecheck / compose / docker build 全绿 ✓
  • 本地代理已重启加载(路由开 + spec + 免费模型分散 + 断连自愈 + 多轮锚定)

🐳 镜像

ghcr.io/hengxin666/freebuff-proxy:1.5.4latest 同步),升级:docker compose pull && docker compose up -d你服务器上的远程部署也需要拉取这个版本(hxapi→SUBapi 链路才会带上替换语义 + 多轮锚定修复)。