返回全部动态

Anthropic Python SDK v2.2.0 发布

原标题:v2.2.0

Anthropic Python SDK Releases一手来源API 更新质量 64

AI 摘要

Anthropic 发布 Python SDK v2.2.0,新增消息线程(message threads)API 支持,并新增按维度统计的用量与成本报告,同时将旧版报告标记为 legacy。该版本还修复了客户端 max_retries 错误提示、工具运行器在 append_messages() 与 set_messages_params() 回调中的历史与工具定义处理,以及 betas、user_profile_id、workspace_id 等字段保留问题。此外更新了依赖与文档说明。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

### Features * **api:** add support for message threads * **api:** add usage and cost reports by dimension, mark older reports legacy ### Bug Fixes * **client:** stop suggesting math.inf in the max_retries error message * **tools:** leave the tool runner's history to the caller after `append_messages()`, and keep the current reply out of the `set_messages_params()` callback * **tools:** keep running the tool runner's function tools when `set_messages_params()` gives `tools` as definitions, a


发布时间:2026-10-23 21:10
抓取时间:2026-10-23 21:11
来源机构:Anthropic
阅读原文github.com