Claude返回的深度思考块,为什么除了可读文字,还藏着一串看不懂的signature?
它是类似哈希的校验码,还是对称加密的密文?
工具调用执行完,为什么客户端必须把这个思考块原样带回?
本期从Claude Code接入自建vLLM(Qwen 3.8)的真实工具调用抓包讲起,沿着“第一轮发出请求 → 收到thinking与tool_use → 本地执行Bash命令 → 第二轮组装thinking与tool_result回传”的完整时序,逐层对照:
1. Anthropic官方文档中的加密机制与display模式(omitted / summarized / redacted_thinking);
2. vLLM v0.27.1源码中signature的随机UUID占位实现;
3. OpenClaw开源Issue中,因SSE增量覆盖导致signature被截断、触发HTTP 400的经典翻车案例;
4. 闭源模型保护推理优势(防蒸馏)与开源模型通过部署使用做大生态的商业策略差异。
做Agent应用开发、多模型接入、AI网关与SDK封装的同学,建议重点看05:05的覆盖缺陷与05:40的消息保存原则。
【参考资料】
- Anthropic Thinking文档:https://platform.claude.com/docs/en/build-with-claude/thinking
- Anthropic防蒸馏说明:https://support.claude.com/en/articles/16761192-preserved-thinking-changing-how-the-messages-api-handles-thinking-blocks-to-protect-against-distillation
- vLLM serving源码:https://github.com/vllm-project/vllm/blob/v0.27.1/vllm/entrypoints/anthropic/serving.py
- OpenClaw Issue #87574:https://github.com/openclaw/openclaw/issues/87574
- OpenClaw修复PR #87582:https://github.com/openclaw/openclaw/pull/87582
【下期预告】
第10期我们将用同样的问题和同一个自建模型,对比OpenAI Codex使用的Responses协议,看它是如何组织思考与工具状态的。