非公式・AI自動要約ニュースサイト(Anthropic公式とは無関係)
Claude News JP / www.claude-news.online
📰 ニュース Anthropic 🔵 標準 LLMコーディング · 出典: SDK (anthropic-sdk-python)

ツール圧縮+Bedrock堅牢化。長時間実行AIの文脈効率が改善される

anthropic-sdk-python v1.7.0リリース:ツール圧縮とレート制限の改善

原題: anthropics/anthropic-sdk-python: v1.7.0

重要度の根拠: 通常の機能追加・バグ修正リリースで、既存ユーザーへの即影響は限定的だが、ツール実行・Bedrock 連携・MCP ツーリングの安定性に関わる。

要約

Anthropic が Python SDK を v1.7.0 にアップデートしました。主な変更は、ツール実行時にコンテキストを圧縮する `compact_before_next_turn()` メソッドの追加、レート制限 API の `display_name` フィールド導入と `group_type` の廃止予定、および AWS Bedrock・クライアント応答解析に関する複数のバグ修正です。Pydantic 1.10 以上が必須要件になりました。

要点

  • compact_before_next_turn()でツール実行時のコンテキスト圧縮が可能に
  • レート制限APIが display_name 対応、group_type は非推奨化
  • Bedrock 例外処理の改善で堅牢性向上
  • union 型解析の柔軟化で応答パース時のエラーが減少
  • Pydantic 1.10 以上が必須要件に
開発者向け技術解説(API・実装詳細・破壊的変更)を見る

v1.7.0 の重要な SDK 変更:(1) ToolRunner に `compact_before_next_turn()` メソッドを追加——tool_calls の圧縮前状態を記録、failure_handling を改善、(2) レート制限スキーマで `group` フィールドに `display_name` を追加、`group_type` を非推奨化,(3) Bedrock 統合で eventstream 例外・エラーフレームを適切に API エラーとして raise,(4) クライアント応答パース時に `X | Y` union 型を受け入れ、不明なデータで TypeError を発生させない,(5) anthropic-beta ヘッダで複数値をカンマ区切り(スペースなし)で連結,(6) MCP ツールヘルパーで `strict=` パラメータを zip() に渡すように強化、内部的に Python 3.10 ターゲット化。

本文の日本語訳(全文)を見る

## 1.7.0 (2026年9月18日)

完全な変更ログ: [v1.6.0...v1.7.0](https://github.com/anthropics/anthropic-sdk-python/compare/v1.6.0...v1.7.0)

### 新機能

* **API:** レート制限に display_name を持つ group を追加、group_type を非推奨化 ([28f0a83](https://github.com/anthropics/anthropic-sdk-python/commit/28f0a831355fa3d539fd3e1db1c63f92a39bb252))

* **ツール:** ツール実行器に compact_before_next_turn() を追加 ([#641](https://github.com/anthropics/anthropic-sdk-python/issues/641)) ([8b23fb3](https://github.com/anthropics/anthropic-sdk-python/commit/8b23fb33f326c7ffa52e8d925902af0fd94501ce))

### バグ修正

* **Bedrock:** eventstream 例外とエラーフレームに対して API エラーを raise ([#769](https://github.com/anthropics/anthropic-sdk-python/issues/769)) ([8ec9cc9](https://github.com/anthropics/anthropic-sdk-python/commit/8ec9cc9bdf7278ce7a1557dc7d6e455c7808946e))

* **クライアント:** 応答解析時に `X | Y` union 型を受け入れる ([b366fa5](https://github.com/anthropics/anthropic-sdk-python/commit/b366fa5a1d62e4908a35415a1692f18621cf9e2c))

* **クライアント:** `X | Y` フィールドで不明なデータに対して TypeError を raise しない ([30ebd69](https://github.com/anthropics/anthropic-sdk-python/commit/30ebd6963c4b21044fc8d7f8cf33a19981c74856))

* **クライアント:** 複数の anthropic-beta 値をカンマで連結し、スペースなしで結合 ([#781](https://github.com/anthropics/anthropic-sdk-python/issues/781)) ([1680324](https://github.com/anthropics/anthropic-sdk-python/commit/168032429a6880ef7063de7680c7abe18e45be35))

* **ツール:** compact_before_next_turn() の状態と failure_handling を整理 ([#804](https://github.com/anthropics/anthropic-sdk-python/issues/804)) ([d3a9fc8](https://github.com/anthropics/anthropic-sdk-python/commit/d3a9fc80f9792eda4944e33efb821306e632b7c6))

### その他の変更

* **依存関係:** Pydantic 1.10 以上を要求 ([91931e1](https://github.com/anthropics/anthropic-sdk-python/commit/91931e1d205839e72b2a4c2c851b18874f935943))

* **ドキュメント:** enum 値とパスパラメータの説明を追加 ([99184dc](https://github.com/anthropics/anthropic-sdk-python/commit/99184dc76a7a6c404478556483d2118498994a47))

* **ドキュメント:** 圧縮時の tool_changes と tool change の説明を明確化 ([eacc0ff](https://github.com/anthropics/anthropic-sdk-python/commit/eacc0ffde324201faac42fdcb60500b2076c25b6))

* **内部:** 不要な cast コメントを追加 ([9e6ce27](https://github.com/anthropics/anthropic-sdk-python/commit/9e6ce27b8d89c737bd427fc91b96f9932431f547))

* **内部:** MCP ツールヘルパーで zip() に strict= を渡す ([13cfe64](https://github.com/anthropics/anthropic-sdk-python/commit/13cfe644920119b718e0a73085b7ecd9726fb9e9))

* **内部:** モデルテストから不要な noqa コメントを削除 ([2c18298](https://github.com/anthropics/anthropic-sdk-python/commit/2c18298ff35a1b28b98d25b424e928b3865ef405))

* **内部:** ruff のターゲットバージョンを Python 3.10 に設定 ([2bdfd41](https://github.com/anthropics/anthropic-sdk-python/commit/2bdfd415fe4842b44f871b31328cc76135b48fbb))

API/SDKSkills/MCP対象: 開発者

出典: https://github.com/anthropics/anthropic-sdk-python/releases/tag/v1.7.0

媒体: SDK (anthropic-sdk-python)

※本記事は Anthropic / Claude 関連の公開情報を基に AI (OpenAI GPT-4o-mini) が日本語で要約・分類した二次的著作物です。著作権法第32条の引用要件に基づき出典 URL を必ず併記しています。要約は AI 生成のため誤訳・誤解釈を含む可能性があります。詳細・正確な情報は必ず出典元の原文をご確認ください。