Skip to content

v2.3.9: 上下文裁剪 + 路径修复 + 错误兜底 / Context Pruning + Path Fix + Error Handling

Choose a tag to compare

@Fly143 Fly143 released this 31 May 18:31
· 19 commits to main since this release

v2.3.9 - 上下文裁剪 + 路径修复 + 错误兜底

🛠 新增

  • 上下文自动裁剪 — 新增 context_manager.py,请求发出前检查 token 数,超长时自动裁剪避免 DeepSeek 报 "Content is too long"
    • 4 级渐进裁剪:删旧轮次 → 清推理链 → 截断工具结果 → 截断工具定义
    • 激进裁剪 + 终极兜底用于重试
  • /v1/v1/ 双前缀修复 — Claude Code CLI 等客户端 base URL 带 /v1 时自动修复路径
  • Anthropic 流式错误兜底 — 上游返回错误时(如 "Content is too long")返回标准 Anthropic error 事件,不再静默失败

💡 no-tools 版本见 v2.3.9-no-tools

English

🛠 Added

  • Proactive context pruning — new context_manager.py checks token count before sending requests, auto-prunes when exceeding DeepSeek context limit
    • 4-level progressive pruning: remove old turns → strip reasoning → truncate tool results → truncate tool definitions
    • Aggressive pruning + ultimate fallback for retries
  • /v1/v1/ double-prefix fix — auto-rewrites paths when Claude Code CLI and similar clients include /v1 in base URL
  • Anthropic streaming error handling — returns standard Anthropic error events when upstream errors occur (e.g. "Content is too long"), instead of silent failure

💡 no-tools version: v2.3.9-no-tools