Claude Code真别手贱升级,已踩坑

Claude Code真别手贱升级,已踩坑
Claude Code真别手贱升级,已踩坑
github.com/deepseek-ai/DeepSeek-V3 [BUG] Anthropic 兼容端点:thinking:disabled 与 reasoning_effort 互斥导致 Claude Code 2.1.166+ 子 Agent 全部不可用 已打开 05:28AM - 06 Jun 26 UTC heming-gmh

**Describe the bug** DeepSeek Anthropic 兼容端点 (`/anthropic`) 在校验请求参数时,将 `thinking: { type: "disabled" }` 与 `reasoning_effort` 视为互斥,返回 HTTP 400: > thinking options type cannot be disabled when reasoning_effort is set 这导致 Claude Code 2.1.166+ 的 Workflow/Dynamic Workflow(多 Agent 编排)功能完全不可用。 **背景** Claude Code 2.1.166 引入了 thinking 显式控制能力。此后所有子 Agent(subagent)创建时,Claude Code 会发送 `thinking: { type: "disabled" }`——因为子 Agent 不需要向用户展示思考过程。 同时,DeepSeek 官方文档推荐配置 `CLAUDE_CODE_EFFORT_LEVEL=max`,这会向 API 注入 `reasoning_effort` 参数以启用深度推理。 两个参数同时在请求中出现时,DeepSeek API 拒绝请求。 **To Reproduce** 环境: ```bash export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic export ANTHROPIC_MODEL=deepseek-v4-pro[1m] export CLAUDE_CODE_EFFORT_LEVEL=max ``` 1. 安装 Claude Code ≥ 2.1.166(当前最新 2.1.167) 2. 创建任意 Workflow(多 Agent 任务) 3. 子 Agent 创建时 API 返回 400 已验证的版本矩阵: | Claude Code | Effort Level | 结果 | |-------------|-------------|------| | 2.1.165 | max / xhigh / high / low | ✅ 全部正常 | | 2.1.166 | 任意 | ❌ 400 | | 2.1.167 | 任意 | ❌ 400 | **Root Cause** Claude Code 2.1.166+ 对子 Agent 硬编码 `thinking: disabled`。DeepSeek 兼容层校验 `thinking: disabled` 与 `reasoning_effort` 不可共存,返回 400。 **Expected behavior** 两种改法均可解决: 方案 A(推荐):当 `thinking: disabled` 与 `reasoning_effort` 同时存在时,允许请求通过。`thinking: disabled` 仅表示不输出思考块,不代表模型不能内部推理。对于 deepseek-v4-pro 等推理模型,关闭思考输出 + 开启推理力度是合理组合。 方案 B:忽略 `disabled`,对推理模型内部按 `enabled` 处理。 **Additional context** - DeepSeek 官方文档明确推荐 Claude Code 配置 `CLAUDE_CODE_EFFORT_LEVEL=max`:https://api-docs.deepseek.com/zh-cn/guides/anthropic_api - 受影响的 Agent 框架不止 Claude Code——任何在 Anthropic 兼容模式下发送 `thinking: disabled` + `reasoning_effort` 的客户端都会触发 - 当前唯一 workaround:回退 Claude Code 到 2.1.165 并锁定二进制 - 相关 Issue:#1376(thinking 模式与 tool_choice 冲突,同类校验过严问题)

今天升了一下级,subagent直接没法用了,我还在想是我哪里配置错了吗?无语了。。。

b556999aa045b59a98ca65d5c9bb5549

7 个帖子 - 6 位参与者

阅读完整话题

来源: LinuxDo 最新话题查看原文