feat: 移除反蒸馏代码

This commit is contained in:
claude-code-best
2026-04-02 22:56:23 +08:00
parent 5ee49fd106
commit c252294dd7
6 changed files with 14 additions and 40 deletions

View File

@@ -1,5 +1,17 @@
# DEV-LOG
## 移除反蒸馏机制 (2026-04-02)
项目中发现三处 anti-distillation 相关代码,全部移除。
**移除内容:**
- `src/services/api/claude.ts` — 删除 fake_tools 注入逻辑(原第 302-314 行),该代码通过 `ANTI_DISTILLATION_CC` feature flag 在 API 请求中注入 `anti_distillation: ['fake_tools']`,使服务端在响应中混入虚假工具调用以污染蒸馏数据
- `src/utils/betas.ts` — 删除 connector-text summarization beta 注入块及 `SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER` 导入,该机制让服务端缓冲工具调用间的 assistant 文本并摘要化返回
- `src/constants/betas.ts` — 删除 `SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER` 常量定义(原第 23-25 行)
- `src/utils/streamlinedTransform.ts` — 注释从 "distillation-resistant" 改为 "compact"streamlined 模式本身是有效的输出压缩功能,仅修正描述
---
## Buddy 命令合入 + Feature Flag 规范修正 (2026-04-02)
合入 `pr/smallflyingpig/36` 分支(支持 buddy 命令 + 修复 rehatch并修正 feature flag 使用方式。