ClaudeDevs· @ClaudeDevs · X·· 28 天前AI 评分45
AI 导读
Anthropic 在 Messages API 上推出 Message threads 公开测试版:API 会在服务端缓存轮次之间的对话,开发者只需发送新消息和上一条消息 ID,无需重发完整对话,Claude 因此能更早开始响应。 使用方式是在请求中添加 thread 参数和 beta header。该功能已在 Claude Platform、AWS 上的 Claude Platform、Microsoft Foundry 中的 Claude 以及 Google Cloud 上的 Claude 提供,按标准 token 费率计费。据 Anthropic 博客,线程在最后一次请求后 5 分钟过期,客户端需重发完整对话以开启新线程。 Anthropic 称,Claude Code 已集成消息线程;在 500K 到 1M token 的请求上,首 token 中位时间降低约 35%,长对话中请求中位数从约 800 KB 降至 1.8 KB。这些数据来自 Anthropic 的说法。
正文 · 原文
We recently integrated message threads in Claude Code. On requests with 500K to 1M tokens, median time to first token is about 35% lower.
来源:ClaudeDevs · x.com