---
title: Claude Opus 5.5移行ガイド
url: https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide
description: この移行ガイドを使用して、以前のOpusモデルまたはClaude Sonnet 5からClaude Opus 5.5に切り替えます。Claude Opus 5.5を有効にするためのガイダンスには、エラーを返すリクエスト設定、すべてのレスポンスに含まれる思考ブロック、および移行元モデルごとのチェックリストが含まれます。
---

<Note>
  このガイドでは、[Messages API](https://platform.claude.com/docs/ja/build-with-claude/working-with-messages)のコードの移行について説明します。[Claude Managed Agents](https://platform.claude.com/docs/ja/managed-agents/overview)を使用している場合は、モデル名の更新以外に変更は必要ありません。
</Note>

<Tip>
  **Claude APIスキルで移行を自動化しましょう。** Claude Codeで`/claude-api migrate`を実行すると、バンドルされている[Claude APIスキル](https://platform.claude.com/docs/ja/agents-and-tools/agent-skills/claude-api-skill#migrating-to-a-newer-claude-model)が呼び出されます。現行のどのClaudeモデルでも移行先として指定できます。

  Claude Codeにコードの移行を任せる

  ```text
  /claude-api migrate このプロジェクトをclaude-opus-5-5に移行してください
  ```

  このスキルは、モデルIDの置き換えに加えて、必要に応じて破壊的なパラメータ変更、プリフィルの置き換え、移行先モデルに合わせたeffortの調整をコードベース全体に適用し、その後、手動で確認すべき項目のチェックリストを生成します。ファイルを編集する前に、移行の対象範囲（作業ディレクトリ全体、サブディレクトリ、または特定のファイルリスト）の確認を求めます。また、このスキルはAmazon BedrockおよびClaude Platform on AWSのクライアントを検出し、それらのプラットフォーム向けにモデルIDの形式や機能の変更を調整します。
</Tip>

このページでは、[Claude Opus 5](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-5)、[Claude Opus 4.8](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-4-8)、[Claude Opus 4.7](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-47)、[Claude Opus 4.6以前のOpusモデル](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-46)、または[Claude Sonnet 5](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-sonnet-5)からClaude Opus 5.5へ移行するためのコード変更を説明します。すべての読者は、[Claude Opus 5.5へのすべてのリクエストが満たす必要がある要件](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#request-requirements)と[すべてのレスポンスで思考を処理する](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-in-every-response)を確認する必要があります。その後、現在使用しているモデルのセクションに進んでください。各セクションの最初の文に、該当する他のセクションが記載されています。[移行チェックリスト](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migration-checklist)には、移行元モデルごとにすべての変更が記載されています。

Claude Opus 5.5はClaude Opus 5よりも低コストです（入力/出力100万トークンあたり$4 / $20 USD。Claude Opus 5は$5 / $25です。[Claudeの料金](https://platform.claude.com/docs/ja/about-claude/pricing)を参照してください）。機能のサポート状況については、[Claude Opus 5.5の新機能](https://platform.claude.com/docs/ja/models/opus-5-5/whats-new-opus-5-5#feature-support)を参照してください。動作の違いとモデル固有のプロンプトパターンについては、[Claude Opus 5.5へのプロンプティング](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-opus-5-5)を参照してください。

## Claude Opus 5.5へのすべてのリクエストが満たす必要がある要件

どのモデルから移行する場合でも、`claude-opus-5-5`へのリクエストは以下を満たす必要があります。設定が拒否されると記載されている項目では、APIは400エラーを返します。

* **モデルID：** 日付サフィックスのない固定モデルIDである`claude-opus-5-5`を使用します。Amazon Bedrock、Claude Platform on AWS、Google Cloud、Microsoft Foundryでは、各プラットフォームのモデルIDを使用してください。[提供状況](https://platform.claude.com/docs/ja/models/opus-5-5/whats-new-opus-5-5#availability)を参照してください。
* **思考：** `thinking`フィールドを送信しないか、同等の`thinking: {"type": "adaptive"}`を送信します。[adaptive thinking（適応型思考）](https://platform.claude.com/docs/ja/build-with-claude/thinking)は常に有効です。`thinking: {"type": "disabled"}`および手動の思考予算（`thinking: {"type": "enabled", "budget_tokens": N}`）は拒否されます。[思考の変更前と変更後](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-cant-be-disabled)を参照してください。
* **エフォート（effort）：** 思考の深さは、それを制御する唯一のリクエストパラメータである[エフォートパラメータ](https://platform.claude.com/docs/ja/build-with-claude/effort)で制御します。5つのレベル（`low`、`medium`、`high`、`xhigh`、`max`）すべてがサポートされており、デフォルトは`medium`です。[Claude Opus 5.5の推奨エフォートレベル](https://platform.claude.com/docs/ja/build-with-claude/effort#recommended-effort-levels-for-claude-opus-5-5)を参照してください。
* **ツール選択：** `tool_choice`には`{"type": "auto"}`（デフォルト）または`{"type": "none"}`を使用します。`{"type": "any"}`または`{"type": "tool", "name": "..."}`によるツール呼び出しの強制は拒否されます。[ツール選択の変更前と変更後](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#forced-tool-use)を参照してください。
* **サンプリングパラメータ：** `temperature`、`top_p`、`top_k`は省略するか、デフォルト値のままにしてください。それ以外の値は拒否されます。モデルの動作を誘導するにはプロンプトを使用してください。
* **プリフィル：** `messages`を「prefill」（プリフィル）されたアシスタントターンで終わらせないでください。拒否されます。代わりに[「structured outputs」（構造化出力）](https://platform.claude.com/docs/ja/build-with-claude/structured-outputs)またはシステムプロンプトの指示を使用してください。Amazon BedrockではClaude Opus 5.5で構造化出力を利用できないため、システムプロンプトの指示を使用してください。
* **コンピュータ使用（computer use）：** Claude APIとGoogle Cloudでは、コンピュータ使用を`computer_toolset_20260801`ツールセットとして宣言します。これらのプラットフォームでは、以前の`computer_20251124`ツールは拒否されます。[コンピュータ使用の破壊的変更](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#computer-use-toolset)を参照してください。
* **コンテキストウィンドウ：** コンテキストウィンドウ用のベータヘッダーは不要です。[100万トークンのコンテキストウィンドウ](https://platform.claude.com/docs/ja/build-with-claude/context-windows)がデフォルトであり、古いモデル向けに送信されたヘッダーは効果がありません。

次のリクエストは、リストのすべての項目を満たしています。エフォートが設定されており、`thinking`フィールドはありません。テキストを出力するSDKタブでは、`thinking`ブロックが先頭に来るため、ブロックタイプによってテキストを選択しています。

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 4096,
      "messages": [{
        "role": "user",
        "content": "Analyze the trade-offs between microservices and monolithic architectures"
      }],
      "output_config": {
        "effort": "medium"
      }
    }'
  ```

  ```bash CLI
  ant messages create \
    --model claude-opus-5-5 \
    --max-tokens 4096 \
    --output-config '{effort: medium}' \
    --message '{role: user, content: "Analyze the trade-offs between microservices and monolithic architectures"}'
  ```

  ```python Python
  client = anthropic.Anthropic()

  response = client.messages.create(
      model="claude-opus-5-5",
      max_tokens=4096,
      messages=[
          {
              "role": "user",
              "content": "Analyze the trade-offs between microservices and monolithic architectures",
          }
      ],
      output_config={"effort": "medium"},
  )

  for block in response.content:
      if block.type == "text":
          print(block.text)
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const response = await client.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 4096,
    messages: [
      {
        role: "user",
        content: "Analyze the trade-offs between microservices and monolithic architectures"
      }
    ],
    output_config: {
      effort: "medium"
    }
  });

  const textBlock = response.content.find(
    (block): block is Anthropic.TextBlock => block.type === "text"
  );
  console.log(textBlock?.text);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var parameters = new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 4096,
      Messages = [
          new() {
              Role = Role.User,
              Content = "Analyze the trade-offs between microservices and monolithic architectures"
          }
      ],
      OutputConfig = new OutputConfig
      {
          Effort = Effort.Medium
      }
  };

  var message = await client.Messages.Create(parameters);
  Console.WriteLine(message);
  ```

  ```go Go
  client := anthropic.NewClient()

  response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 4096,
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the trade-offs between microservices and monolithic architectures")),
  	},
  	OutputConfig: anthropic.OutputConfigParam{
  		Effort: anthropic.OutputConfigEffortMedium,
  	},
  })
  if err != nil {
  	log.Fatal(err)
  }
  for _, block := range response.Content {
  	if textBlock, ok := block.AsAny().(anthropic.TextBlock); ok {
  		fmt.Println(textBlock.Text)
  	}
  }
  ```

  ```java Java
  import com.anthropic.models.messages.OutputConfig;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      MessageCreateParams params = MessageCreateParams.builder()
          .model(Model.CLAUDE_OPUS_5_5)
          .maxTokens(4096L)
          .addUserMessage("Analyze the trade-offs between microservices and monolithic architectures")
          .outputConfig(OutputConfig.builder()
              .effort(OutputConfig.Effort.MEDIUM)
              .build())
          .build();

      Message response = client.messages().create(params);
      response.content().stream()
          .flatMap(block -> block.text().stream())
          .forEach(textBlock -> IO.println(textBlock.text()));
  }
  ```

  ```php PHP
  $client = new Client();

  $message = $client->messages->create(
      maxTokens: 4096,
      messages: [
          ['role' => 'user', 'content' => 'Analyze the trade-offs between microservices and monolithic architectures']
      ],
      model: 'claude-opus-5-5',
      outputConfig: ['effort' => 'medium'],
  );

  foreach ($message->content as $block) {
      if ($block->type === 'text') {
          echo $block->text, PHP_EOL;
      }
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  message = client.messages.create(
    model: "claude-opus-5-5",
    max_tokens: 4096,
    messages: [
      { role: "user", content: "Analyze the trade-offs between microservices and monolithic architectures" }
    ],
    output_config: {
      effort: "medium"
    }
  )

  message.content.each do |block|
    puts block.text if block.type == :text
  end
  ```
</CodeGroup>

## すべてのレスポンスで思考を処理する

Claude Opus 5.5ではすべてのリクエストで思考が実行されるため、すべてのレスポンスが`thinking`ブロックで始まる可能性があり、`max_tokens`は思考とテキストの両方を対象とします。コードがすでに思考を有効にして実行されている場合、項目1〜3はおそらく対応済みです。項目4と5を確認してください。以前のいずれかのモデルで思考なしで実行していた場合は、各項目が変更点となります。

1. **`max_tokens`は思考とテキストの両方を対象とする：** Claude Opus 4.8以前のOpusモデルでは、`thinking`フィールドのないリクエストは思考なしで実行されます。Claude Opus 5とClaude Sonnet 5は`thinking: {"type": "disabled"}`を受け付けます。Claude Opus 5.5では、すべてのリクエストが[適応型思考](https://platform.claude.com/docs/ja/build-with-claude/thinking)で実行されます。`max_tokens`は引き続き出力全体（思考とレスポンステキストの合計）に対する厳格な上限であるため、思考なしで実行していたワークロードでは見直してください。思考トークンは、思考テキストが返されない場合でも出力トークンとして課金されるため、そのようなワークロードではリクエストあたりの出力トークンが増える可能性があります。[コスト制御](https://platform.claude.com/docs/ja/build-with-claude/thinking-steering-and-cost#cost-control)を参照してください。思考に費やすトークンを減らすには、[エフォート](https://platform.claude.com/docs/ja/build-with-claude/effort)レベルを下げてください。`xhigh`または`max`のエフォートで実行する場合は、モデルが思考して行動する余地を確保できるよう、`max_tokens`を大きく設定してください。64kトークンから始めて、そこから調整します。プロンプトが思考なしでの実行向けに調整されていた場合は、[思考無効を前提に書かれたプロンプト](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-opus-5-5#prompts-written-for-thinking-disabled)を参照してください。

2. **レスポンスは思考ブロックで始まる：** レスポンスは、最初の`text`ブロックの前に1つ以上の`thinking`ブロックで始まる場合があります。`content[0].text`や、最初の`content_block_start`イベントをテキストとして扱うストリームハンドラーのように、位置によって応答を読み取るコードは、このようなレスポンスで動作しなくなります。代わりに、`type`フィールドでコンテンツブロックを選択してください。`type`が`"text"`のブロックから`text`を読み取り、ストリームイベントを処理する際はブロックタイプで分岐します。

3. **ツール使用ループでは思考ブロックを変更せずに返す：** ツール使用ループを実行する場合、ツール結果を返す際に、各アシスタントレスポンスの`thinking`ブロックを、`thinking`フィールドが空のブロックも含めて、完全かつ変更せずにAPIに渡してください。コンテンツブロックをタイプでフィルタリングしたり再構築したりせず、受信したとおりにアシスタントメッセージをそのまま返してください。APIは、編集、並べ替え、または一部が削除された思考ブロックを400エラーで拒否します。[思考ブロックの保持](https://platform.claude.com/docs/ja/build-with-claude/thinking#preserving-thinking-blocks)を参照してください。

4. **思考テキストはデフォルトで省略される：** `thinking.display`のデフォルトは`"omitted"`であるため、`thinking`ブロックは`signature`とともに空の`thinking`フィールドで届きます。`thinking`フィールドは表示用テキストとしてのみ扱ってください。代わりに読みやすい要約を受け取るには、`thinking.display`を`"summarized"`に設定します：

   <CodeGroup exclude="shell">
     ```python Python
     thinking = {
         "type": "adaptive",
         "display": "summarized",
     }
     ```

     ```typescript TypeScript
     const thinking = {
       type: "adaptive",
       display: "summarized"
     };
     ```

     ```csharp C#
     var thinking = new ThinkingConfigAdaptive { Display = Display.Summarized };
     ```

     ```go Go
     thinking := anthropic.ThinkingConfigParamUnion{
     	OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{
     		Display: anthropic.ThinkingConfigAdaptiveDisplaySummarized,
     	},
     }
     ```

     ```java Java
     ThinkingConfigAdaptive thinking = ThinkingConfigAdaptive.builder()
         .display(ThinkingConfigAdaptive.Display.SUMMARIZED)
         .build();
     ```

     ```php PHP
     $thinking = ['type' => 'adaptive', 'display' => 'summarized'];
     ```

     ```ruby Ruby
     thinking = {
       type: "adaptive",
       display: "summarized"
     }
     ```
   </CodeGroup>

   製品がユーザーに推論をストリーミングしている場合、デフォルトでは出力が始まる前に長い待ち時間が発生するように見えます。思考中の進捗表示を復元するには、`display: "summarized"`を設定してください。[思考表示の制御](https://platform.claude.com/docs/ja/build-with-claude/thinking#controlling-thinking-display)を参照してください。

5. **ツール呼び出し間のテキストは思考ブロックで届く：** モデルがツール呼び出しの間に書く短いメモは`thinking`ブロックとして返され、デフォルトの表示設定では空になります。[ツール呼び出し間のテキストは思考ブロックで返される](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#text-between-tool-calls)を参照してください。

## 移行元モデル別の移行チェックリスト

グループを上から順に確認し、現在のモデルが記載されたグループで止めてください。そこまでのすべての項目が該当します。Claude Opus 5を使用している場合は、最初のグループがリスト全体です。Claude Sonnet 5を使用している場合は、最初のグループと最後のグループを適用してください。

### すべての移行元モデル

* モデルIDを`claude-opus-5-5`に更新します。
* `thinking: {"type": "disabled"}`と`thinking: {"type": "enabled", ...}`を削除し、代わりにエフォートレベルを選択します。
* `effort`を明示的に設定します。デフォルトは`medium`ですが、Claude Opus 5のデフォルトは`high`です。
* `tool_choice`のタイプ`any`と`tool`を、`auto`と厳密なツール使用または構造化出力の組み合わせに置き換えます。Amazon Bedrockでは`auto`のみに置き換えます。
* Claude APIまたはGoogle Cloudでコンピュータ使用を利用している場合は、`computer_20251124`の代わりに`computer_toolset_20260801`（ベータヘッダーなし）を宣言し、ツールセットに合わせてエージェントループを更新します。Amazon Bedrockでは`computer_20251124`をそのまま使用してください。その他のプラットフォームについては、コンピュータ使用ツールの[互換性](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/computer-use-tool#compatibility)セクションを確認してください。
* ルーターまたはフォールバックによって会話がClaude Opus 5.5から別のモデルに移る可能性がある場合、そのモデルはClaude Opus 5.5の思考ブロックなしで実行されることを想定してください（Claude API上のClaude Fable 5.1とClaude Mythos 5.1は例外で、思考ブロックを保持します）。Claude Opus 5.5自体は、Claude Opus 5、以前のOpus、Sonnet、Haikuモデル、およびClaude APIとGoogle Cloud上ではClaude Sonnet 5.5とClaude Haiku 5.5からの思考を読み取りますが、Claude FableまたはClaude Mythosモデルからの思考は読み取りません。
* コンテンツブロックは`type`で読み取り、ツール使用ループでは`thinking`ブロックを変更せずに返します。
* インターフェースでツール呼び出し間のテキストを表示している場合は、`display: "updates"`（ベータ）または`"summarized"`を設定し、空でない`thinking`ブロックを表示します。
* コードが会話の途中で以前のターン、`system`プロンプト、または`tools`を編集する場合は、[保持された思考](https://platform.claude.com/docs/ja/build-with-claude/preserved-thinking)に従ってください。
* `stop_reason: "refusal"`を処理し、フォールバックを設定します。
* 選択したエフォートレベルでコストとレイテンシのベースラインを再測定します。
* コードで思考を無効にしていた場合は、思考とレスポンステキストの両方を対象とする`max_tokens`を見直してください。`xhigh`または`max`のエフォートでは64kから始めます。[すべてのレスポンスで思考を処理する](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-in-every-response)を参照してください。

### Claude Opus 4.8以前

* `thinking`フィールドなしで実行していたワークロードを見直します。Claude Opus 5.5ではこれらは思考ありで実行され、思考を無効にすることはできません。出力全体（思考とレスポンステキストの合計）に対する厳格な上限であり続ける`max_tokens`を見直し、思考を減らしたい箇所では`effort`を下げてください。思考トークンは出力トークンとして課金されるため、これらのワークロードではリクエストあたりの出力トークンが増える可能性があります。
* `thinking`フィールドを解析するコードが、それを表示用テキストとしてのみ扱っていることを確認します。読みやすい要約を受け取るには`display: "summarized"`を設定します。
* キャッシュの最小長に近いプロンプトを見直します。512トークン以上のプロンプトはキャッシュエントリを作成できます。
* 組織に[Priority Tier](https://platform.claude.com/docs/ja/api/service-tiers#supported-models)のコミットメントがある場合は、容量を別途計画してください。Claude Opus 5.5ではPriority Tierはサポートされていません。
* `xhigh`または`max`のエフォートで実行する場合は、出発点として`max_tokens`を少なくとも64kに引き上げます。
* エージェント型ワークロードでは、[タスクバジェット](https://platform.claude.com/docs/ja/build-with-claude/task-budgets)（ベータ）と会話途中のツール変更（ベータ）を検討してください。

### Claude Opus 4.7以前

* 以前のモデル向けに調整された設定を引き継ぐのではなく、独自の評価で[エフォート](https://platform.claude.com/docs/ja/build-with-claude/effort)のスイープを新たに実行します。
* コンテキストウィンドウ用のベータヘッダーをすべて削除します。
* 指示を更新するために会話履歴を再構築している場合は、プロンプトキャッシングのキャッシュヒットを維持するため、会話途中のシステムメッセージへの切り替えを検討してください。
* 停止理由の処理で、拒否時に`stop_details`を読み取っていることを確認します。
* Claude Opus 4.7では拒否される高速モードを使用したい場合は、Claude APIリクエストで`speed: "fast"`を設定します。Claude Opus 5.5ではベータヘッダーは不要です。

### Claude Opus 4.6以前

* リクエストペイロードから`temperature`、`top_p`、`top_k`を削除します。
* `thinking: {"type": "enabled", "budget_tokens": N}`を`thinking: {"type": "adaptive"}`と[エフォートパラメータ](https://platform.claude.com/docs/ja/build-with-claude/effort)の組み合わせに置き換えるか、`thinking`フィールドを完全に削除します。適応型思考は常に有効です。
* UIで思考内容を表示している場合は、思考の要約を明示的にオプトインします。
* 更新されたトークン化のもとで、エンドツーエンドのコストとレイテンシを再ベンチマークします。
* 更新されたトークン化を考慮して、コンパクション（compaction）のトリガーを含め`max_tokens`を再調整します。
* クライアント側のトークン数推定を再テストします。
* アプリケーションが画像を送信する場合は、[高解像度画像のサポート](https://platform.claude.com/docs/ja/build-with-claude/vision#high-resolution-image-support-on-claude-opus-4-7)（フル解像度の画像1枚あたり最大約3倍の画像トークン）に合わせて予算を見直します。追加の忠実度が不要な場合は、送信前にダウンサンプリングしてください。
* モデルからのポインティング座標やバウンディングボックス座標を使用している場合は、スケール係数の変換をすべて削除します。Claude Opus 4.7以降のモデルでは、座標は実際の画像ピクセルと1:1で対応します。
* Claude Opus 4.7で始まった[動作の変更](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#behavior-changes)を確認します。
* 製品が正当なセキュリティ業務を行う場合は、サイバー関連コンテンツに対する制限の緩和を受けるために[Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet)に申請してください。

### Claude Opus 4.5以前

* アシスタントメッセージのプリフィルをすべて削除します。Claude Opus 4.6ですでに拒否されます。
* ツール呼び出しのJSON解析に標準のJSONパーサーを使用していることを確認します。
* `client.beta.messages.create()` (csharp: `client.Beta.Messages.Create()`; go: `client.Beta.Messages.New()`; java: `client.beta().messages().create()`; php: `$client->beta->messages->create()`; cli: `ant beta:messages create`)から`client.messages.create()` (csharp: `client.Messages.Create()`; go: `client.Messages.New()`; java: `client.messages().create()`; php: `$client->messages->create()`; cli: `ant messages create`)に移行します。適応型思考とエフォートにはベータ名前空間は不要です。
* `effort-2025-11-24`ベータヘッダーを削除します（エフォートパラメータには不要です）。
* `fine-grained-tool-streaming-2025-05-14`ベータヘッダーを削除します。
* `interleaved-thinking-2025-05-14`ベータヘッダーを削除します（適応型思考はインターリーブ思考を自動的に有効にします）。
* `output_format`を`output_config.format`に移行します（該当する場合）。

### Claude 4.1以前

* ツールのバージョンを更新します（`text_editor_20250728`、`code_execution_20260521`）。
* `refusal`停止理由を処理します。
* `model_context_window_exceeded`停止理由を処理します。
* ツールの文字列パラメータで末尾の改行が正しく処理されることを確認します。
* レガシーのベータヘッダー（`token-efficient-tools-2025-02-19`、`output-128k-2025-02-19`）を削除します。
* [プロンプトのベストプラクティス](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/claude-prompting-best-practices)に従ってプロンプトを見直し、更新します。

### Claude Sonnet 5のみ

* 指示を更新するために会話履歴を再構築している場合は、プロンプトキャッシングのキャッシュヒットを維持するため、会話途中のシステムメッセージへの切り替えを検討してください。
* キャッシュの最小長に近いプロンプトを見直します。512トークン以上のプロンプトはキャッシュエントリを作成できます。

## Claude Opus 5からClaude Opus 5.5への移行

まず、[Claude Opus 5.5へのすべてのリクエストが満たす必要がある要件](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#request-requirements)と[すべてのレスポンスで思考を処理する](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-in-every-response)を確認してください。このセクションの変更は、すべての移行元モデルで必要です。これらは、Claude Opus 5.5が拒否するリクエスト設定と、それに伴うレスポンスの変更です。このセクションのチェックリストは、[移行チェックリスト](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migration-checklist)の最初のグループです。

### モデル名を更新する

```python
model = "claude-opus-5"  # Before
model = "claude-opus-5-5"  # After
```

`claude-opus-5-5`は日付サフィックスのない固定モデルIDで、`claude-opus-5`と同じ命名方式です。Amazon Bedrock、Claude Platform on AWS、Google Cloud、Microsoft Foundryでは、各プラットフォームのモデルIDを使用してください。[提供状況](https://platform.claude.com/docs/ja/models/opus-5-5/whats-new-opus-5-5#availability)を参照してください。

### 破壊的変更

各変更の説明は[Claude Opus 5.5の新機能](https://platform.claude.com/docs/ja/models/opus-5-5/whats-new-opus-5-5#breaking-changes)にあります。このセクションでは、それぞれに必要なコード変更を示します。

#### 思考を無効にできない

`thinking: {"type": "disabled"}`と`thinking: {"type": "enabled", "budget_tokens": N}`はどちらも400エラー（`"thinking.type.disabled" is not supported for this model.`または`"thinking.type.enabled" is not supported for this model.`）を返します。`thinking`フィールドを削除し、[effort](https://platform.claude.com/docs/ja/build-with-claude/effort)（エフォート）レベルを選択してください。トークンを節約するために思考を無効にしていた箇所では、より低いレベルを使用してください。その場合、レスポンスは`thinking`ブロックから始まるため、コンテンツブロックは`type`で選択し、`thinking`ブロックはツール結果とともに変更せずに返してください。[思考を無効にできない](https://platform.claude.com/docs/ja/models/opus-5-5/whats-new-opus-5-5#thinking-cant-be-disabled)を参照してください。

変更前。Claude Opus 5はこのリクエストを受け付けますが、Claude Opus 5.5は400エラーで拒否します：

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5",
      "max_tokens": 16000,
      "thinking": {"type": "disabled"},
      "messages": [{"role": "user", "content": "..."}]
    }'
  ```

  ```bash CLI
  ant messages create \
    --model claude-opus-5 \
    --max-tokens 16000 \
    --thinking '{type: disabled}' \
    --message '{role: user, content: "..."}'
  ```

  ```python Python
  client.messages.create(
      model="claude-opus-5",
      max_tokens=16000,
      thinking={"type": "disabled"},
      messages=[{"role": "user", "content": "..."}],
  )
  ```

  ```typescript TypeScript
  await client.messages.create({
    model: "claude-opus-5",
    max_tokens: 16000,
    thinking: { type: "disabled" },
    messages: [{ role: "user", content: "..." }]
  });
  ```

  ```csharp C#
  await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5,
      MaxTokens = 16000,
      Thinking = new ThinkingConfigDisabled(),
      Messages = [new() { Role = Role.User, Content = "..." }],
  });
  ```

  ```go Go
  client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5,
  	MaxTokens: 16000,
  	Thinking: anthropic.ThinkingConfigParamUnion{
  		OfDisabled: &anthropic.ThinkingConfigDisabledParam{},
  	},
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(anthropic.NewTextBlock("...")),
  	},
  })
  ```

  ```java Java
  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5)
      .maxTokens(16000L)
      .thinking(ThinkingConfigDisabled.builder().build())
      .addUserMessage("...")
      .build();

  client.messages().create(params);
  ```

  ```php PHP
  $client->messages->create(
      model: Model::CLAUDE_OPUS_5,
      maxTokens: 16000,
      thinking: ThinkingConfigDisabled::with(),
      messages: [['role' => 'user', 'content' => '...']],
  );
  ```

  ```ruby Ruby
  client.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5,
    max_tokens: 16000,
    thinking: Anthropic::ThinkingConfigDisabled.new,
    messages: [{ role: "user", content: "..." }]
  )
  ```
</CodeGroup>

変更後：

<CodeGroup>
  ```bash cURL
  # thinking は常に有効です。制御には effort を使用します
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 16000,
      "output_config": {"effort": "low"},
      "messages": [{"role": "user", "content": "..."}]
    }'
  ```

  ```bash CLI
  # thinking は常に有効です。制御には effort を使用します
  ant messages create \
    --model claude-opus-5-5 \
    --max-tokens 16000 \
    --output-config '{effort: low}' \
    --message '{role: user, content: "..."}'
  ```

  ```python Python
  client.messages.create(
      model="claude-opus-5-5",
      max_tokens=16000,
      output_config={"effort": "low"},  # thinking is always on; effort is the control
      messages=[{"role": "user", "content": "..."}],
  )
  ```

  ```typescript TypeScript
  await client.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 16000,
    output_config: { effort: "low" }, // thinking is always on; effort is the control
    messages: [{ role: "user", content: "..." }]
  });
  ```

  ```csharp C#
  await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 16000,
      OutputConfig = new() { Effort = Effort.Low }, // thinking is always on; effort is the control
      Messages = [new() { Role = Role.User, Content = "..." }],
  });
  ```

  ```go Go
  client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 16000,
  	OutputConfig: anthropic.OutputConfigParam{
  		Effort: anthropic.OutputConfigEffortLow, // thinking is always on; effort is the control
  	},
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(anthropic.NewTextBlock("...")),
  	},
  })
  ```

  ```java Java
  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5_5)
      .maxTokens(16000L)
      // thinking は常に有効です。制御には effort を使用します
      .outputConfig(OutputConfig.builder()
          .effort(OutputConfig.Effort.LOW)
          .build())
      .addUserMessage("...")
      .build();

  client.messages().create(params);
  ```

  ```php PHP
  $client->messages->create(
      model: Model::CLAUDE_OPUS_5_5,
      maxTokens: 16000,
      // thinking は常に有効で、effort で制御します
      outputConfig: OutputConfig::with(effort: Effort::LOW),
      messages: [['role' => 'user', 'content' => '...']],
  );
  ```

  ```ruby Ruby
  client.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5_5,
    max_tokens: 16000,
    # thinking は常に有効です。制御には effort を使用します
    output_config: { effort: Anthropic::OutputConfig::Effort::LOW },
    messages: [{ role: "user", content: "..." }]
  )
  ```
</CodeGroup>

#### 強制ツール使用はサポートされていない

`tool_choice`のタイプ`any`と`tool`は、トークンカウントエンドポイントを含め、400エラー（`tool_choice: type "tool" and "any" are not supported for this model.`）を返します。[厳密なツール使用](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/strict-tool-use)または[構造化出力](https://platform.claude.com/docs/ja/build-with-claude/structured-outputs)とともに`auto`を使用し、ツールを適用すべき場面をプロンプトで伝えてください。厳密なツール使用はJSON Schemaのサブセットを受け付けるため、`strict: true`を追加する前に各ツールの`input_schema`を確認してください。スキーマ内のすべてのオブジェクトで`additionalProperties: false`を設定する必要があります。[JSON Schemaの制限](https://platform.claude.com/docs/ja/build-with-claude/structured-outputs#json-schema-limitations)を参照してください。Amazon Bedrockでは、厳密なツール使用を含む構造化出力はClaude Opus 5.5で利用できません。そこでは`strict`なしで`auto`を送信し、ツールを適用すべき場面をプロンプトで伝え、コード内でツール入力を検証してください。[強制ツール使用はサポートされていない](https://platform.claude.com/docs/ja/models/opus-5-5/whats-new-opus-5-5#forced-tool-use-is-not-supported)を参照してください。

変更前。Claude Opus 5はこのリクエストを受け付けますが、Claude Opus 5.5は400エラーで拒否します：

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5",
      "max_tokens": 1024,
      "tools": [{
        "name": "get_weather",
        "description": "Get the current weather in a given location",
        "input_schema": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "The city and state, e.g. San Francisco, CA"
            }
          },
          "required": ["location"],
          "additionalProperties": false
        }
      }],
      "tool_choice": {"type": "tool", "name": "get_weather"},
      "messages": [{"role": "user", "content": "What'\''s the weather in Paris?"}]
    }'
  ```

  ```bash CLI
  ant messages create <<'YAML'
  model: claude-opus-5
  max_tokens: 1024
  tools:
    - name: get_weather
      description: Get the current weather in a given location
      input_schema:
        type: object
        properties:
          location:
            type: string
            description: The city and state, e.g. San Francisco, CA
        required: [location]
        additionalProperties: false
  tool_choice:
    type: tool
    name: get_weather
  messages:
    - role: user
      content: What's the weather in Paris?
  YAML
  ```

  ```python Python
  client.messages.create(
      model="claude-opus-5",
      max_tokens=1024,
      tools=tools,
      tool_choice={"type": "tool", "name": "get_weather"},
      messages=[{"role": "user", "content": "What's the weather in Paris?"}],
  )
  ```

  ```typescript TypeScript
  await client.messages.create({
    model: "claude-opus-5",
    max_tokens: 1024,
    tools,
    tool_choice: { type: "tool", name: "get_weather" },
    messages: [{ role: "user", content: "What's the weather in Paris?" }]
  });
  ```

  ```csharp C#
  await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5,
      MaxTokens = 1024,
      Tools = [.. tools],
      ToolChoice = new ToolChoiceTool { Name = "get_weather" },
      Messages = [new() { Role = Role.User, Content = "What's the weather in Paris?" }],
  });
  ```

  ```go Go
  client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:      anthropic.ModelClaudeOpus5,
  	MaxTokens:  1024,
  	Tools:      tools,
  	ToolChoice: anthropic.ToolChoiceParamOfTool("get_weather"),
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(anthropic.NewTextBlock("What's the weather in Paris?")),
  	},
  })
  ```

  ```java Java
  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5)
      .maxTokens(1024L)
      .tools(tools)
      .toolChoice(ToolChoiceTool.of("get_weather"))
      .addUserMessage("What's the weather in Paris?")
      .build();

  client.messages().create(params);
  ```

  ```php PHP
  $client->messages->create(
      model: Model::CLAUDE_OPUS_5,
      maxTokens: 1024,
      tools: $tools,
      toolChoice: ToolChoiceTool::with(name: 'get_weather'),
      messages: [['role' => 'user', 'content' => "What's the weather in Paris?"]],
  );
  ```

  ```ruby Ruby
  client.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5,
    max_tokens: 1024,
    tools: tools,
    tool_choice: Anthropic::ToolChoiceTool.new(name: "get_weather"),
    messages: [{ role: "user", content: "What's the weather in Paris?" }]
  )
  ```
</CodeGroup>

変更後：

<CodeGroup>
  ```bash cURL
  # strict tool use（厳格なツール使用）：すべての呼び出しがツールの input_schema に一致します
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 1024,
      "tools": [{
        "name": "get_weather",
        "description": "Get the current weather in a given location",
        "input_schema": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "The city and state, e.g. San Francisco, CA"
            }
          },
          "required": ["location"],
          "additionalProperties": false
        },
        "strict": true
      }],
      "tool_choice": {"type": "auto"},
      "messages": [{
        "role": "user",
        "content": "What'\''s the weather in Paris? Use the get_weather tool."
      }]
    }'
  ```

  ```bash CLI
  ant messages create <<'YAML'
  model: claude-opus-5-5
  max_tokens: 1024
  tools:
    - name: get_weather
      description: Get the current weather in a given location
      input_schema:
        type: object
        properties:
          location:
            type: string
            description: The city and state, e.g. San Francisco, CA
        required: [location]
        additionalProperties: false
      # 厳格なツール使用: すべての呼び出しがツールの input_schema に一致します
      strict: true
  tool_choice:
    type: auto
  messages:
    - role: user
      content: What's the weather in Paris? Use the get_weather tool.
  YAML
  ```

  ```python Python
  client.messages.create(
      model="claude-opus-5-5",
      max_tokens=1024,
      # 厳格なツール使用: すべての呼び出しがツールの input_schema に一致します
      tools=[{**tool, "strict": True} for tool in tools],
      tool_choice={"type": "auto"},
      messages=[
          {
              "role": "user",
              "content": "What's the weather in Paris? Use the get_weather tool.",
          }
      ],
  )
  ```

  ```typescript TypeScript
  await client.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 1024,
    // strict tool use（厳格なツール使用）: すべての呼び出しがツールの input_schema に一致します
    tools: tools.map((tool) => ({ ...tool, strict: true })),
    tool_choice: { type: "auto" },
    messages: [
      {
        role: "user",
        content: "What's the weather in Paris? Use the get_weather tool."
      }
    ]
  });
  ```

  ```csharp C#
  await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 1024,
      // strict tool use（厳格なツール使用）：すべての呼び出しがツールの input_schema に一致します
      Tools = [.. tools.Select(tool => tool with { Strict = true })],
      ToolChoice = new ToolChoiceAuto(),
      Messages =
      [
          new()
          {
              Role = Role.User,
              Content = "What's the weather in Paris? Use the get_weather tool.",
          },
      ],
  });
  ```

  ```go Go
  // strict tool use（厳格なツール使用）：すべての呼び出しがツールの input_schema に一致します
  var strictTools []anthropic.ToolUnionParam
  for _, tool := range tools {
  	strictTool := *tool.OfTool
  	strictTool.Strict = anthropic.Bool(true)
  	strictTools = append(strictTools, anthropic.ToolUnionParam{OfTool: &strictTool})
  }
  client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:      anthropic.ModelClaudeOpus5_5,
  	MaxTokens:  1024,
  	Tools:      strictTools,
  	ToolChoice: anthropic.ToolChoiceUnionParam{OfAuto: &anthropic.ToolChoiceAutoParam{}},
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(
  			anthropic.NewTextBlock("What's the weather in Paris? Use the get_weather tool."),
  		),
  	},
  })
  ```

  ```java Java
  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5_5)
      .maxTokens(1024L)
      // strict tool use（厳格なツール使用）: すべての呼び出しがツールの input_schema に一致します
      .tools(tools.stream()
          .map(tool -> tool.tool()
              .map(customTool -> customTool.toBuilder().strict(true).build())
              .map(ToolUnion::ofTool)
              .orElse(tool))
          .toList())
      .toolChoice(ToolChoiceAuto.builder().build())
      .addUserMessage("What's the weather in Paris? Use the get_weather tool.")
      .build();

  client.messages().create(params);
  ```

  ```php PHP
  $client->messages->create(
      model: Model::CLAUDE_OPUS_5_5,
      maxTokens: 1024,
      // strict tool use（厳密なツール使用）: すべての呼び出しがツールの input_schema に一致します
      tools: array_map(fn (Tool $tool) => $tool->withStrict(true), $tools),
      toolChoice: ToolChoiceAuto::with(),
      messages: [
          [
              'role' => 'user',
              'content' => "What's the weather in Paris? Use the get_weather tool.",
          ],
      ],
  );
  ```

  ```ruby Ruby
  client.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5_5,
    max_tokens: 1024,
    # 厳格なツール使用: すべての呼び出しがツールの input_schema に一致します
    tools: tools.map { |tool| tool.merge(strict: true) },
    tool_choice: Anthropic::ToolChoiceAuto.new,
    messages: [
      { role: "user", content: "What's the weather in Paris? Use the get_weather tool." }
    ]
  )
  ```
</CodeGroup>

#### 思考ブロックはモデルと会話に紐づいている

Claude APIでは、Claude Fable 5.1とClaude Mythos 5.1がClaude Opus 5.5の思考ブロックを読み取ります。それ以外のモデルは読み取りません。会話をClaude Opus 5.5から他のモデルに移すルーターまたはフォールバックは、それらのターンを思考ブロックなしで実行します。逆方向では、Claude Opus 5.5は、Claude Opus 5、以前のOpus、Sonnet、Haikuモデル、およびClaude APIとGoogle Cloud上ではClaude Sonnet 5.5とClaude Haiku 5.5からの思考ブロックを読み取りますが、Claude FableまたはClaude Mythosモデルからの思考ブロックは読み取りません。ブロックを有効に保つために、会話を追記のみ（会話の途中で`system`プロンプト、`tools`、または以前のメッセージを編集しない）にしてください。Claude Code、claude.ai、Claude Managed Agents、Claude Agent SDKはすでにそうしています。適用はすべてのプラットフォームでClaude Fable 5.1と同じです。2026年8月31日00:00 UTC以降に作成されたアカウントでは、そのような編集の後に思考ブロックを再送すると、デフォルトで400エラーが返されます。追記のみの統合ではコード変更は不要です。[思考ブロックはモデルと会話に紐付けられる](https://platform.claude.com/docs/ja/models/opus-5-5/whats-new-opus-5-5#thinking-blocks-are-tied-to-the-model-that-produced-them)と[保持された思考](https://platform.claude.com/docs/ja/build-with-claude/preserved-thinking)を参照してください。

#### `computer_20251124`コンピュータ使用ツールはClaude APIとGoogle Cloudではサポートされていない

Claude APIとGoogle Cloudでは、タイプが`computer_20251124`の`tools`エントリは400エラー（`'claude-opus-5-5' does not support tool types: computer_20251124.`の後に、モデルが受け付けるツールタイプが続きます）を返します。代わりに`computer_toolset_20260801`ツールセットを宣言してください。ベータヘッダーを削除し、`name`や表示サイズを指定せずにエントリを送信します。エージェントループでは、メンバーの`tool_use`ブロック（アクションは`input.action`ではなくブロックの`name`です）を1ターンに複数処理し、すべての結果で`toolset_name`をそのまま返してください。リクエストの変更は以下に示します。エージェントループの変更は[`computer_20251124`からの移行](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124)に記載されています。Amazon Bedrockでは、以前の`computer_20251124`ツールはClaude Opus 5と同様にClaude Opus 5.5でも引き続き動作するため、変更は不要です。その他のプラットフォームについては、コンピュータ使用ツールの[互換性](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/computer-use-tool#compatibility)セクションを参照してください。[`computer_20251124`コンピュータ使用ツールはClaude APIとGoogle Cloudではサポートされていない](https://platform.claude.com/docs/ja/models/opus-5-5/whats-new-opus-5-5#computer-20251124-is-not-supported)を参照してください。

変更前。Claude Opus 5はこのリクエストを受け付けますが、Claude APIとGoogle Cloudでは、Claude Opus 5.5は400エラーで拒否します：

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "anthropic-beta: computer-use-2025-11-24" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5",
      "max_tokens": 4096,
      "tools": [{
        "type": "computer_20251124",
        "name": "computer",
        "display_width_px": 1024,
        "display_height_px": 768
      }],
      "messages": [{"role": "user", "content": "Open the display settings."}]
    }'
  ```

  ```bash CLI
  ant beta:messages create \
    --model claude-opus-5 \
    --max-tokens 4096 \
    --beta computer-use-2025-11-24 \
    --tool '{
      type: computer_20251124,
      name: computer,
      display_width_px: 1024,
      display_height_px: 768
    }' \
    --message '{role: user, content: "Open the display settings."}'
  ```

  ```python Python
  client.beta.messages.create(
      model="claude-opus-5",
      max_tokens=4096,
      betas=["computer-use-2025-11-24"],
      tools=[
          {
              "type": "computer_20251124",
              "name": "computer",
              "display_width_px": 1024,
              "display_height_px": 768,
          }
      ],
      messages=[{"role": "user", "content": "Open the display settings."}],
  )
  ```

  ```typescript TypeScript
  await client.beta.messages.create({
    model: "claude-opus-5",
    max_tokens: 4096,
    betas: ["computer-use-2025-11-24"],
    tools: [
      {
        type: "computer_20251124",
        name: "computer",
        display_width_px: 1024,
        display_height_px: 768
      }
    ],
    messages: [{ role: "user", content: "Open the display settings." }]
  });
  ```

  ```csharp C#
  await client.Beta.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5,
      MaxTokens = 4096,
      Betas = [AnthropicBeta.ComputerUse2025_11_24],
      Tools =
      [
          new BetaToolComputerUse20251124
          {
              DisplayWidthPx = 1024,
              DisplayHeightPx = 768,
          },
      ],
      Messages = [new() { Role = Role.User, Content = "Open the display settings." }],
  });
  ```

  ```go Go
  client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5,
  	MaxTokens: 4096,
  	Betas:     []anthropic.AnthropicBeta{anthropic.AnthropicBetaComputerUse2025_11_24},
  	Tools: []anthropic.BetaToolUnionParam{
  		{OfComputerUseTool20251124: &anthropic.BetaToolComputerUse20251124Param{
  			DisplayWidthPx:  1024,
  			DisplayHeightPx: 768,
  		}},
  	},
  	Messages: []anthropic.BetaMessageParam{
  		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Open the display settings.")),
  	},
  })
  ```

  ```java Java
  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5)
      .maxTokens(4096L)
      .addBeta(AnthropicBeta.COMPUTER_USE_2025_11_24)
      .addTool(BetaToolComputerUse20251124.builder()
          .displayWidthPx(1024L)
          .displayHeightPx(768L)
          .build())
      .addUserMessage("Open the display settings.")
      .build();

  client.beta().messages().create(params);
  ```

  ```php PHP
  $client->beta->messages->create(
      model: Model::CLAUDE_OPUS_5,
      maxTokens: 4096,
      betas: [AnthropicBeta::COMPUTER_USE_2025_11_24],
      tools: [
          BetaToolComputerUse20251124::with(
              displayWidthPx: 1024,
              displayHeightPx: 768,
          ),
      ],
      messages: [['role' => 'user', 'content' => 'Open the display settings.']],
  );
  ```

  ```ruby Ruby
  client.beta.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5,
    max_tokens: 4096,
    betas: [Anthropic::AnthropicBeta::COMPUTER_USE_2025_11_24],
    tools: [
      Anthropic::Beta::BetaToolComputerUse20251124.new(
        name: :computer,
        display_width_px: 1024,
        display_height_px: 768
      )
    ],
    messages: [{ role: "user", content: "Open the display settings." }]
  )
  ```
</CodeGroup>

変更後：

<CodeGroup>
  ```bash cURL
  # ベータヘッダーは不要です。toolset エントリには名前も表示サイズも指定しません
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 4096,
      "tools": [{"type": "computer_toolset_20260801"}],
      "messages": [{"role": "user", "content": "Open the display settings."}]
    }'
  ```

  ```bash CLI
  # ベータヘッダーは不要です。toolset エントリには名前や表示サイズを指定しません
  ant messages create \
    --model claude-opus-5-5 \
    --max-tokens 4096 \
    --tool '{type: computer_toolset_20260801}' \
    --message '{role: user, content: "Open the display settings."}'
  ```

  ```python Python
  client.messages.create(
      model="claude-opus-5-5",
      max_tokens=4096,
      # ベータヘッダーは不要です。toolset エントリには名前や表示サイズを指定しません
      tools=[{"type": "computer_toolset_20260801"}],
      messages=[{"role": "user", "content": "Open the display settings."}],
  )
  ```

  ```typescript TypeScript
  await client.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 4096,
    // ベータヘッダーは不要です。toolset エントリには名前や表示サイズを指定しません
    tools: [{ type: "computer_toolset_20260801" }],
    messages: [{ role: "user", content: "Open the display settings." }]
  });
  ```

  ```csharp C#
  await client.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 4096,
      // beta ヘッダーは不要です。toolset エントリには name や表示サイズを指定しません
      Tools = [new ComputerToolset20260801()],
      Messages = [new() { Role = Role.User, Content = "Open the display settings." }],
  });
  ```

  ```go Go
  client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 4096,
  	// ベータヘッダーは不要です。toolset エントリには名前や表示サイズを指定しません
  	Tools: []anthropic.ToolUnionParam{
  		{OfComputerToolset20260801: &anthropic.ComputerToolset20260801Param{}},
  	},
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(anthropic.NewTextBlock("Open the display settings.")),
  	},
  })
  ```

  ```java Java
  MessageCreateParams params = MessageCreateParams.builder()
      .model(Model.CLAUDE_OPUS_5_5)
      .maxTokens(4096L)
      // ベータヘッダーは不要です。toolset エントリには名前や表示サイズを指定しません
      .addTool(ComputerToolset20260801.builder().build())
      .addUserMessage("Open the display settings.")
      .build();

  client.messages().create(params);
  ```

  ```php PHP
  $client->messages->create(
      model: Model::CLAUDE_OPUS_5_5,
      maxTokens: 4096,
      // ベータヘッダーは不要です。toolset エントリには名前や表示サイズを指定しません
      tools: [ComputerToolset20260801::with()],
      messages: [['role' => 'user', 'content' => 'Open the display settings.']],
  );
  ```

  ```ruby Ruby
  client.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5_5,
    max_tokens: 4096,
    # ベータヘッダーは不要です。toolset エントリには名前や表示サイズを指定しません
    tools: [Anthropic::ComputerToolset20260801.new],
    messages: [{ role: "user", content: "Open the display settings." }]
  )
  ```
</CodeGroup>

### ツール呼び出し間のテキストは思考ブロックで返される

Claude Opus 5では、モデルがツール呼び出しの間に書くテキストは`text`ブロックとして返されます。Claude Opus 5.5では、Claude Fable 5.1と同様に、そのナレーションは[進捗更新の`thinking`ブロック](https://platform.claude.com/docs/ja/build-with-claude/thinking#progress-updates)として、各ツール呼び出しの前に最大1つ返されます。`thinking.display`がデフォルトの`"omitted"`の場合、その`thinking`フィールドは空です。リクエストが失敗することはありませんが、そのテキストを進捗更新としてユーザーにストリーミングしているアプリケーションでは、ツール呼び出しの間に何も表示されなくなります。更新を復元するには、`thinking`ブロックから読み取り、テキストを返す`display`値を設定してください。`"updates"`（ベータ、`thinking-display-updates-2026-08-18`ヘッダー）は推論を非表示にしたまま進捗更新を返し、`"summarized"`は両方を混在させて返します。その後、空でない各`thinking`ブロックを、その直後にある`tool_use`ブロックの前にレンダリングし、ブロックはアシスタントターンの残りの部分とともに変更せずに返してください。[ユーザー向けの進捗更新](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-opus-5-5#user-facing-progress-updates)を参照してください。

### 安全性分類器とフォールバック

Claude Opus 5.5は、`stop_details`カテゴリとともに`stop_reason: "refusal"`を返すことがあります。その分類器はClaude Opus 5よりも幅広いカテゴリを対象としているため、`"cyber"`や`"reasoning_extraction"`に加えて`"bio"`などの`stop_details.category`値を想定してください。[拒否カテゴリの表](https://platform.claude.com/docs/ja/build-with-claude/refusals-and-fallback#refusal-response)を参照してください。拒否を処理し、[サーバーサイドフォールバック](https://platform.claude.com/docs/ja/build-with-claude/refusals-and-fallback#server-side-fallback)または独自の再試行を設定してください（サーバーサイドフォールバックは`"reasoning_extraction"`で拒否されたリクエストを再試行しません。その拒否はそのまま返されます）。[拒否とフォールバック](https://platform.claude.com/docs/ja/build-with-claude/refusals-and-fallback)と[セーフガードによる拒否](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-opus-5-5#safeguard-refusals)を参照してください。

### 推奨される変更

1. **エフォートのスイープを再実行してください。** Claude Opus 5.5ではエフォートが唯一の思考制御であり、そのデフォルトはClaude Opus 5の`high`に対して`medium`です。そのため、`effort`を省略したリクエストは`medium`で実行されるようになります。品質が維持される場合はレベルを下げ、最も要求の厳しい作業ではレベルを上げてください。[エフォート](https://platform.claude.com/docs/ja/build-with-claude/effort)を参照してください。
2. **モデル固有のプロンプト指示を再評価してください。** Claude Opus 5の動作に合わせて調整した指示は不要になっている可能性があります。[Claude Opus 5.5へのプロンプティング](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-opus-5-5)を参照してください。思考を無効にして実行していた場合は、[思考無効を前提に書かれたプロンプト](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-opus-5-5#prompts-written-for-thinking-disabled)も参照してください。
3. 本番トラフィックを切り替える前に、**開発環境でテストしてください**。

## Claude Opus 4.8からClaude Opus 5.5への移行

まず、[Claude Opus 5.5へのすべてのリクエストが満たす必要がある要件](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#request-requirements)、[すべてのレスポンスで思考を処理する](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-in-every-response)、[Claude Opus 5からClaude Opus 5.5への移行](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-5)を確認してください。置き換えるモデルIDとして`claude-opus-4-8`を使用します。最後のセクションは、Claude Opus 4.8上のコードにもそのまま適用されます。Claude Opus 4.8はClaude Opus 5と同様に、次のように動作するためです：

* `thinking: {"type": "disabled"}`、強制的なツール選択、`computer_20251124`ツールを受け付けます。
* ツール呼び出し間のテキストを`text`ブロックとして返します。
* デフォルトのエフォートは`high`です。

このセクションでは、Claude Opus 4.8とClaude Opus 5の間で変更された点を追加で説明します。チェックリストについては、[移行チェックリスト](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migration-checklist)の最初の2つのグループを参照してください。

### 変更点

1. **思考を省略していたリクエストでも思考が実行される：** Claude Opus 4.8では、要求しない限り思考はオフです。Claude Opus 5.5では、`thinking`フィールドのないリクエストは思考ありで実行されるため、[すべてのレスポンスで思考を処理する](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-in-every-response)のすべての項目がそのコードにとって変更点となります。コードで`thinking`フィールドを一度も送信していなかった場合、[思考の変更前と変更後](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-cant-be-disabled)で削除するものはありません。

2. **プロンプトキャッシングの最小長の引き下げ：** Claude Opus 5.5でキャッシュ可能なプロンプトの最小長は512トークンで、Claude Opus 4.8の1,024トークンから引き下げられました。Claude Opus 4.8では短すぎてキャッシュできなかったプロンプトも、コード変更なしでキャッシュエントリを作成できます。モデルごとの最小長については[プロンプトキャッシング](https://platform.claude.com/docs/ja/build-with-claude/prompt-caching#cache-limitations)を参照してください。

3. **Priority Tierはサポートされない：** [Priority Tier](https://platform.claude.com/docs/ja/api/service-tiers#supported-models)はClaude Opus 5.5ではサポートされていませんが、Claude Opus 4.8では引き続き利用できます。組織にPriority Tierのコミットメントがある場合は、容量を別途計画してください。

### 推奨される変更

以下は必須ではありませんが、エクスペリエンスが向上します：

1. **タスクバジェット（ベータ）を検討する：** エージェント型ワークロードでは、[タスクバジェット](https://platform.claude.com/docs/ja/build-with-claude/task-budgets)によって、エージェントループ全体で使用できるトークン数をモデルに伝えられます。`task-budgets-2026-03-13`ベータヘッダーが必要です。

2. **会話途中のツール変更（ベータ）を検討する：** 会話途中のツール変更を使用すると、以前のターンでの[プロンプトキャッシング](https://platform.claude.com/docs/ja/build-with-claude/prompt-caching)のヒットを無効にすることなく、会話のターン間でツールを追加または削除できます。`tools`配列自体を変更すると、キャッシュされたプレフィックスは無効になります。Claude APIでは、`inline-tools-2026-09-15`ベータヘッダーを送信してください。以前の`mid-conversation-tool-changes-2026-07-01`ヘッダーも、Claude API、Amazon Bedrock、Google Cloudで、参照によってツールを指定する変更に対して引き続き機能します。

## Claude Opus 4.7からClaude Opus 5.5への移行

まず、[Claude Opus 5.5へのすべてのリクエストが満たす必要がある要件](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#request-requirements)、[すべてのレスポンスで思考を処理する](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-in-every-response)、[Claude Opus 5からClaude Opus 5.5への移行](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-5)、[Claude Opus 4.8からClaude Opus 5.5への移行](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-4-8)を確認してください。置き換えるモデルIDとして`claude-opus-4-7`を使用します。これらのセクションは、Claude Opus 4.7上のコードにもそのまま適用されます。Claude Opus 4.8と同様に、Claude Opus 4.7は`thinking: {"type": "disabled"}`、強制的なツール選択、`computer_20251124`ツールを受け付けます。デフォルトのエフォートは`high`で、要求しない限り思考なしで実行されます。

このセクションでは、Claude Opus 4.7以降に変更された点を追加で説明します。コードがClaude Opus 4.6以前で動作している場合は、このセクションの後に[Claude Opus 4.6以前のOpusモデルからClaude Opus 5.5への移行](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-46)に進んでください。そこでは、Claude Opus 4.7で導入された破壊的変更を追加で説明しています。チェックリストについては、[移行チェックリスト](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migration-checklist)の最初の3つのグループを参照してください。

### 変更点

これらの項目はいずれも、前のセクションの破壊的変更に新たな破壊的変更を加えるものではありませんが、モデルIDを切り替えた後に確認する価値があります。

1. **エフォートレベルの再調整：** 各エフォートレベルの背後にあるトークン配分は、Claude Opus 4.7と比べてClaude Opus 5.5で変更されています。デフォルトは`medium`ですが、Claude Opus 4.7のデフォルトは`high`です。Claude Opus 4.7向けに調整された設定を引き継ぐのではなく、独自の評価でエフォートのスイープを新たに実行してください。[エフォート](https://platform.claude.com/docs/ja/build-with-claude/effort)を参照してください。

2. **100万トークンのコンテキストウィンドウがデフォルト：** Claude Opus 5.5は、ベータヘッダーなしでデフォルトで100万トークンの[コンテキストウィンドウ](https://platform.claude.com/docs/ja/build-with-claude/context-windows)全体を提供します。古いモデルとの互換性のためにクライアントがコンテキストウィンドウ用のベータヘッダーを渡している場合は、削除してください。

3. **会話途中のシステムメッセージ：** Claude API、Amazon Bedrock、Google Cloudでは、Claude Opus 5.5は`messages`配列内のユーザーターンの直後に`role: "system"`メッセージを受け付けます（[配置ルール](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages#limitations)に従います）。最初から適用される指示には、トップレベルの`system`フィールドを使用してください。Claude Opus 4.7は、`messages`内の`role: "system"`を400エラーで拒否します。指示を更新するためにメッセージ履歴全体を再構築するコードパスを保守している場合は、それを簡素化し、以前のターンでの[プロンプトキャッシング](https://platform.claude.com/docs/ja/build-with-claude/prompt-caching)のヒットを維持できます。

4. **拒否時の停止詳細：** モデルがリクエストを拒否すると、Claude Opus 5.5は`refusal`停止理由とともに、拒否のカテゴリを示す`stop_details`オブジェクトを返します。Claude Opus 4.7も同じオブジェクトを返すため、これが問題になるのは停止理由の処理でまだそれを読み取っていない場合のみです。ベータヘッダーは不要で、オプトアウトはできません。停止理由の処理でまだ読み取っていない場合は、[停止理由の処理](https://platform.claude.com/docs/ja/build-with-claude/handling-stop-reasons)を参照してください。Claude Opus 5.5はより多くのカテゴリで拒否します。[安全性分類器とフォールバック](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#safety-classifiers-and-fallback)を参照してください。

5. **高速モード：** Claude Opus 5.5は、Claude APIで[高速モード](https://platform.claude.com/docs/ja/build-with-claude/fast-mode)をサポートしています。高速モードはClaude Opus 4.7では利用できず、`speed: "fast"`を指定したリクエストはエラーを返します。リクエストで`speed: "fast"`を設定してください。Claude Opus 5.5ではベータヘッダーは不要です。

6. **コンピュータ使用ツールセットとブラウザ使用ツール：** Claude APIとGoogle Cloudでは、Claude Opus 5.5は`computer_toolset_20260801`ツールセットとしての[コンピュータ使用](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/computer-use-tool)と、Webページ内のタスク向けの[ブラウザ使用ツール](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/browser-use-tool)をサポートしています。Claude Opus 4.7はどちらもサポートしていません。これらのプラットフォームでは、Claude Opus 5.5は以前の`computer_20251124`ツールを受け付けません。[コンピュータ使用の破壊的変更](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#computer-use-toolset)を参照してください。

## Claude Opus 4.6以前のOpusモデルからClaude Opus 5.5への移行

まず、前のすべてのセクションをページの順序どおりに確認してください。対象は、[Claude Opus 5.5へのすべてのリクエストが満たす必要がある要件](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#request-requirements)、[すべてのレスポンスで思考を処理する](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-in-every-response)、および[Claude Opus 5](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-5)、[Claude Opus 4.8](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-4-8)、[Claude Opus 4.7](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-47)のセクションです。これらのセクションは、Claude Opus 4.6上のコードにもそのまま適用されます。Claude Opus 4.7と同様に、Claude Opus 4.6は`thinking: {"type": "disabled"}`、強制的なツール選択、`computer_20251124`ツールを受け付けます。デフォルトのエフォートは`high`で、要求しない限り思考なしで実行されます。Claude Opus 4.5以前のOpusモデルも`thinking: {"type": "disabled"}`と強制的なツール選択を受け付け、要求しない限り思考なしで実行されるため、これらのセクションはそれらのモデルにも適用されます。

このセクションでは、置き換えるモデルIDを`claude-opus-4-6`として、Claude Opus 4.7で変更された点を追加で説明します。その2つのサブセクションでは、[Claude Opus 4.5以前](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-45)および[Claude 4.1以前](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-4-1-or-earlier)を使用している読者向けに、それ以前に変更された点を追加で説明します。チェックリストについては、[移行チェックリスト](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migration-checklist)の、使用しているモデルが記載されたグループまでを参照してください。

### 破壊的変更

1. **拡張思考の削除：** `thinking: {"type": "enabled", "budget_tokens": N}` はClaude Opus 4.7以降のモデルではサポートされなくなり、400エラーを返します。[adaptive thinking（適応型思考）](https://platform.claude.com/docs/ja/build-with-claude/thinking)（`thinking: {"type": "adaptive"}`）に切り替え、[エフォートパラメータ](https://platform.claude.com/docs/ja/build-with-claude/effort)で思考の深さを制御してください。Claude Opus 5.5では、適応型思考は常に有効です。`thinking: {"type": "adaptive"}` は有効な指定であり、`thinking` フィールドを完全に省略した場合と同じ動作になります。

   変更前（Claude Opus 4.6）：

   <CodeGroup>
     ```bash cURL
     curl https://api.anthropic.com/v1/messages \
       -H "x-api-key: $ANTHROPIC_API_KEY" \
       -H "anthropic-version: 2023-06-01" \
       -H "content-type: application/json" \
       -d '{
         "model": "claude-opus-4-6",
         "max_tokens": 16000,
         "thinking": {
           "type": "enabled",
           "budget_tokens": 10000
         },
         "messages": [
           {
             "role": "user",
             "content": "..."
           }
         ]
       }'
     ```

     ```bash CLI
     ant messages create <<'YAML'
     model: claude-opus-4-6
     max_tokens: 16000
     thinking:
       type: enabled
       budget_tokens: 10000
     messages:
       - role: user
         content: "..."
     YAML
     ```

     ```python Python
     client.messages.create(
         model="claude-opus-4-6",
         max_tokens=16000,
         thinking={"type": "enabled", "budget_tokens": 10000},
         messages=[{"role": "user", "content": "..."}],
     )
     ```

     ```typescript TypeScript
     await client.messages.create({
       model: "claude-opus-4-6",
       max_tokens: 16000,
       thinking: { type: "enabled", budget_tokens: 10000 },
       messages: [{ role: "user", content: "..." }]
     });
     ```

     ```csharp C#
     using Anthropic;
     using Anthropic.Models.Messages;

     AnthropicClient client = new();

     var parameters = new MessageCreateParams
     {
         Model = Model.ClaudeOpus4_6,
         MaxTokens = 16000,
         Thinking = new ThinkingConfigEnabled(budgetTokens: 10000),
         Messages = [new() { Role = Role.User, Content = "..." }]
     };

     var response = await client.Messages.Create(parameters);
     Console.WriteLine(response);
     ```

     ```go Go
     client := anthropic.NewClient()

     response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
     	Model:     anthropic.ModelClaudeOpus4_6,
     	MaxTokens: 16000,
     	Thinking:  anthropic.ThinkingConfigParamOfEnabled(10000),
     	Messages: []anthropic.MessageParam{
     		anthropic.NewUserMessage(anthropic.NewTextBlock("...")),
     	},
     })
     if err != nil {
     	log.Fatal(err)
     }
     fmt.Println(response)
     ```

     ```java Java
     AnthropicClient client = AnthropicOkHttpClient.fromEnv();

     MessageCreateParams params = MessageCreateParams.builder()
         .model(Model.CLAUDE_OPUS_4_6)
         .maxTokens(16000L)
         .enabledThinking(10000L)
         .addUserMessage("...")
         .build();

     Message response = client.messages().create(params);
     IO.println(response);
     ```

     ```php PHP
     $client = new Client();

     $message = $client->messages->create(
         maxTokens: 16000,
         messages: [['role' => 'user', 'content' => '...']],
         model: 'claude-opus-4-6',
         thinking: ['type' => 'enabled', 'budget_tokens' => 10000],
     );
     ```

     ```ruby Ruby
     client = Anthropic::Client.new

     message = client.messages.create(
       model: "claude-opus-4-6",
       max_tokens: 16000,
       thinking: {
         type: "enabled",
         budget_tokens: 10000
       },
       messages: [
         { role: "user", content: "..." }
       ]
     )
     ```
   </CodeGroup>

   変更後（Claude Opus 5.5）。モデルID、`thinking`、`output_config` の行が異なります：

   <CodeGroup>
     ```bash cURL
     curl https://api.anthropic.com/v1/messages \
       -H "x-api-key: $ANTHROPIC_API_KEY" \
       -H "anthropic-version: 2023-06-01" \
       -H "content-type: application/json" \
       -d '{
         "model": "claude-opus-5-5",
         "max_tokens": 16000,
         "thinking": {
           "type": "adaptive"
         },
         "output_config": {
           "effort": "high"
         },
         "messages": [
           {
             "role": "user",
             "content": "..."
           }
         ]
       }'
     ```

     ```bash CLI
     ant messages create <<'YAML'
     model: claude-opus-5-5
     max_tokens: 16000
     thinking:
       type: adaptive
     output_config:
       effort: high
     messages:
       - role: user
         content: "..."
     YAML
     ```

     ```python Python
     client.messages.create(
         model="claude-opus-5-5",
         max_tokens=16000,
         thinking={"type": "adaptive"},
         output_config={"effort": "high"},  # or "max", "xhigh", "medium", "low"
         messages=[{"role": "user", "content": "..."}],
     )
     ```

     ```typescript TypeScript
     await client.messages.create({
       model: "claude-opus-5-5",
       max_tokens: 16000,
       thinking: { type: "adaptive" },
       output_config: { effort: "high" }, // or "max", "xhigh", "medium", "low"
       messages: [{ role: "user", content: "..." }]
     });
     ```

     ```csharp C#
     using Anthropic;
     using Anthropic.Models.Messages;

     AnthropicClient client = new();

     var parameters = new MessageCreateParams
     {
         Model = Model.ClaudeOpus5_5,
         MaxTokens = 16000,
         Thinking = new ThinkingConfigAdaptive(),
         OutputConfig = new OutputConfig { Effort = Effort.High }, // or Max, Xhigh, Medium, Low
         Messages = [new() { Role = Role.User, Content = "..." }]
     };

     var response = await client.Messages.Create(parameters);
     Console.WriteLine(response);
     ```

     ```go Go
     client := anthropic.NewClient()

     response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
     	Model:     anthropic.ModelClaudeOpus5_5,
     	MaxTokens: 16000,
     	Thinking: anthropic.ThinkingConfigParamUnion{
     		OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
     	},
     	OutputConfig: anthropic.OutputConfigParam{
     		Effort: anthropic.OutputConfigEffortHigh, // or Max, Xhigh, Medium, Low
     	},
     	Messages: []anthropic.MessageParam{
     		anthropic.NewUserMessage(anthropic.NewTextBlock("...")),
     	},
     })
     if err != nil {
     	log.Fatal(err)
     }
     fmt.Println(response)
     ```

     ```java Java
     AnthropicClient client = AnthropicOkHttpClient.fromEnv();

     MessageCreateParams params = MessageCreateParams.builder()
         .model(Model.CLAUDE_OPUS_5_5)
         .maxTokens(16000L)
         .thinking(ThinkingConfigAdaptive.builder().build())
         .outputConfig(OutputConfig.builder()
             .effort(OutputConfig.Effort.HIGH) // or MAX, XHIGH, MEDIUM, LOW
             .build())
         .addUserMessage("...")
         .build();

     Message response = client.messages().create(params);
     IO.println(response);
     ```

     ```php PHP
     $client = new Client();

     $message = $client->messages->create(
         maxTokens: 16000,
         messages: [['role' => 'user', 'content' => '...']],
         model: 'claude-opus-5-5',
         thinking: ['type' => 'adaptive'],
         outputConfig: ['effort' => 'high'], // or 'max', 'xhigh', 'medium', 'low'
     );
     ```

     ```ruby Ruby
     client = Anthropic::Client.new

     message = client.messages.create(
       model: "claude-opus-5-5",
       max_tokens: 16000,
       thinking: {
         type: "adaptive"
       },
       output_config: {
         effort: "high" # or "max", "xhigh", "medium", "low"
       },
       messages: [
         { role: "user", content: "..." }
       ]
     )
     ```
   </CodeGroup>

   適応型思考は、プロンプトと[エフォートパラメータ](https://platform.claude.com/docs/ja/build-with-claude/effort)によって調整できます。モデルの推論量を制御する手段としては、思考予算（thinking budget）に代わってエフォートパラメータを使用します。`budget_tokens` の値をそのまま置き換えるのではなく、独自の評価（eval）でエフォートレベルを変えながら比較してください。各レベルの使い分けは[エフォートレベルの表](https://platform.claude.com/docs/ja/build-with-claude/effort#effort-levels)で、このモデルについては[Claude Opus 5.5の推奨エフォートレベル](https://platform.claude.com/docs/ja/build-with-claude/effort#recommended-effort-levels-for-claude-opus-5-5)で説明しています。

2. **サンプリングパラメータの削除：** Claude Opus 5.5を含むClaude Opus 4.7以降のモデルで、`temperature`、`top_p`、`top_k` のいずれかをデフォルト以外の値に設定すると、400エラーが返されます。Python SDK（v1.0以降）ではこれらのパラメータが定義されておらず、渡すと `TypeError` が発生します。最も安全な移行方法は、リクエストペイロードからこれらのパラメータを完全に省略することです。Claude Opus 5.5でモデルの動作を誘導するには、プロンプトで指示する方法を推奨します。決定性を得るために `temperature = 0` を使用していた場合でも、以前のモデルで同一の出力が保証されていたわけではない点に注意してください。

3. **思考内容がデフォルトで省略：** Claude Opus 4.7以降のモデルでも、思考ブロックはレスポンスストリームに引き続き含まれます。ただし、明示的にオプトインしない限り、その `thinking` フィールドは空になります。Claude Opus 4.6ではデフォルトで要約された思考テキストが返されていたため、これはエラーを伴わない変更です。要約テキストを再び受け取るには、[すべてのレスポンスで思考を処理する](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-in-every-response)の項目4を参照してください。

4. **トークンカウントの更新：** Claude Opus 4.7では新しいトークナイザーが導入され、Claude Opus 5.5を含む以降のOpusモデルでも使用されています。このトークナイザーは幅広いタスクでのパフォーマンス向上に寄与します。一方で、Claude Opus 4.7より前のモデルと比べて、テキスト処理時に約1倍から1.35倍のトークンを使用する場合があります（最大約35%増加し、増加幅はコンテンツによって異なります）。

   [`/v1/messages/count_tokens`](https://platform.claude.com/docs/ja/build-with-claude/token-counting) は、Claude Opus 5.5に対してClaude Opus 4.6とは異なるトークン数を返します。トークン効率はワークロードの特性によって異なる場合があります。

   `max_tokens` パラメータを更新して、コンパクション（compaction）のトリガーも含めて余裕を持たせてください。また、クライアント側でトークン数を推定するコードパスや、トークンと文字の比率を固定値と想定しているコードパスは再テストしてください。検証には[トークンカウントエンドポイント](https://platform.claude.com/docs/ja/build-with-claude/token-counting)を使用してください。プロンプトによる調整、[`task_budget`](https://platform.claude.com/docs/ja/build-with-claude/task-budgets)、[`effort`](https://platform.claude.com/docs/ja/build-with-claude/effort)はコストの制御に役立ちますが、これらの制御によってモデルの知能が低下する場合があります。

5. **プリフィルの削除（Claude Opus 4.6 ですでに適用済み）：** アシスタントメッセージのプリフィルは、Claude Opus 5.5 を含む Claude Opus 4.6 以降の Opus モデルで 400 エラーを返すため、これは Claude Opus 4.5 以前から移行する場合にのみ変更となります。代わりに[構造化出力](https://platform.claude.com/docs/ja/build-with-claude/structured-outputs)またはシステムプロンプトの指示を使用してください。Amazon Bedrock では Claude Opus 5.5 で構造化出力を利用できないため、そこではシステムプロンプトの指示を使用してください。

### 動作の変更

Claude Opus 4.7では、Claude Opus 4.6からいくつかの動作上の違いが導入されました。これらはAPIの破壊的変更ではありません。このうち次の3つは、コードやスキャフォールディングに影響します：

1. **エージェントトレースにおける組み込みの進捗更新：** Claude Opus 4.7は、長いエージェントトレースの間、より頻繁かつ質の高い進捗更新をユーザーに提供します。中間ステータスメッセージを強制するスキャフォールディング（「ツール呼び出し3回ごとに進捗を要約する」など）を追加している場合は、削除を検討してください。Claude Opus 5.5では、これらの更新は `thinking` ブロックで返されますが、`thinking.display` がデフォルトのままだと空になります。更新を受け取るには、[ツール呼び出し間のテキストは思考ブロックで返される](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#text-between-tool-calls)を参照してください。更新の長さや内容を調整するには、[ユーザー向けの進捗更新](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-opus-5-5#user-facing-progress-updates)を参照してください。

2. **リアルタイムのサイバーセキュリティ保護措置：** Claude Opus 4.7で新たに追加された保護措置により、禁止されたトピックや高リスクのトピックを含むリクエストが拒否される場合があります。ペネトレーションテスト、脆弱性調査、レッドチーミングなどの正当なセキュリティ業務を行う場合は、[Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet)に申請して制限の緩和をリクエストしてください。申請方法は、Claudeへのアクセス方法によって異なります。

3. **高解像度画像のサポート：** Claude Opus 4.7は、高解像度画像をサポートする最初のClaudeモデルです。最大画像解像度は長辺2,576ピクセルで、以前のモデルの1,568ピクセルから引き上げられました。これにより、画像を多用するワークロードでの性能が向上します。特に、コンピュータ使用、スクリーンショットの理解、ドキュメント分析で効果を発揮します。

   高解像度サポートは自動であり、ベータヘッダーやクライアント側のオプトインは不要です。計画しておくべき点が2つあります。

   * フル解像度の画像は、以前のモデルと比べて最大約3倍の画像トークンを使用する可能性があります（画像あたり最大4,784トークン。以前の上限は画像あたり約1,600トークン）。画像を多用するワークロードでは `max_tokens` とコストの見込みを再計画するか、追加の忠実度が不要な場合は送信前にダウンサンプリングしてください。
   * モデルが返すポインティング座標とバウンディングボックス座標は、Claude Opus 4.7では実際の画像ピクセルと1:1で対応するため、スケールファクターの変換は不要です。

   詳細については、[Claude Opus 4.7での高解像度画像サポート](https://platform.claude.com/docs/ja/build-with-claude/vision#high-resolution-image-support-on-claude-opus-4-7)を参照してください。

プロンプト側の違いについては、[Claude Opus 5.5へのプロンプティング](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-opus-5-5)および[プロンプトのベストプラクティス](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/claude-prompting-best-practices)を参照してください。

### Claude Opus 4.5以前からの移行

Claude Opus 4.5、Claude Opus 4.1、またはそれ以前のモデルからClaude Opus 5.5に直接移行する場合は、このページを先頭から読んでください。まず、これより前のすべてのセクションをページの順に進めます。次に、このセクションの前半にある[Claude Opus 4.6からの移行における破壊的変更](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#opus-46-breaking-changes)を進めます。最後に、Claude Opus 4.5からClaude Opus 4.7までの間に導入された以下の変更をまとめて適用します。Claude Opus 4.1以前を使用している場合は、このサブセクションの後に[Claude 4.1以前からの移行](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-4-1-or-earlier)に進んでください。

#### 破壊的変更

1. **プリフィルの削除**については、[Claude Opus 4.6からの移行における破壊的変更](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#opus-46-breaking-changes)で説明しています。

2. **ツールパラメータの引用符処理：** Claude Opus 4.6以降のモデルは、ツール呼び出し引数においてわずかに異なるJSON文字列エスケープを生成する場合があります（たとえば、Unicode エスケープやスラッシュのエスケープの処理が異なる）。ツール呼び出しの `input` をJSONパーサーを使用せずに生の文字列として解析している場合は、解析ロジックを検証してください。標準のJSONパーサー（`json.loads()` や `JSON.parse()` など）は、これらの違いを自動的に処理します。

#### 推奨される変更

最初の項目はClaude Opus 5.5では必須で、残りは推奨です。

1. **適応型思考への移行（必須）：** `thinking: {"type": "enabled", "budget_tokens": N}` は Claude Opus 4.7 以降のモデルで 400 エラーを返します。変更前と変更後については、[Claude Opus 4.6 からの移行における破壊的変更](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#opus-46-breaking-changes)の項目 1 を参照してください。この移行では、`client.beta.messages.create()` (csharp: `client.Beta.Messages.Create()`; go: `client.Beta.Messages.New()`; java: `client.beta().messages().create()`; php: `$client->beta->messages->create()`; cli: `ant beta:messages create`) から `client.messages.create()` (csharp: `client.Messages.Create()`; go: `client.Messages.New()`; java: `client.messages().create()`; php: `$client->messages->create()`; cli: `ant messages create`) への移行も行います。適応型思考とエフォートには、ベータ SDK 名前空間やベータヘッダーは必要ありません。

2. **エフォートのベータヘッダーの削除：** エフォートパラメータにはベータヘッダーは必要ありません。リクエストから `effort-2025-11-24` ベータを削除してください。

3. **きめ細かいツールストリーミングのベータヘッダーの削除：** きめ細かいツールストリーミングにはベータヘッダーは必要ありません。リクエストから `fine-grained-tool-streaming-2025-05-14` ベータを削除してください。

4. **インターリーブ思考のベータヘッダーの削除：** 適応型思考では、適応型思考をサポートするすべてのモデルでインターリーブ思考が自動的に有効になります。リクエストから `interleaved-thinking-2025-05-14` ベータを削除してください。

5. **output\_config.formatへの移行：** 構造化出力を使用している場合は、`output_format={...}` を `output_config={"format": {...}}` に更新してください。`output_format` パラメータは非推奨であり、将来削除される予定です。それでも使用する場合は、`structured-outputs-2025-11-13` ベータヘッダーを追加してください。このヘッダーがない場合、APIは400エラーを返します。Python SDK（v1.0以降）では、`client.beta.messages.create()` と `count_tokens()` で `output_format={...}` を指定できません。`parse()` ヘルパーと `stream()` ヘルパーの `output_format=Model` 引数は変更されていません。

### Claude 4.1以前からの移行

Claude Opus 4.1以前のモデルからClaude Opus 5.5に直接移行する場合は、まず[Claude Opus 4.5以前からの移行](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-45)の内容をすべて適用してください。そのサブセクションでは、これより前のすべてのセクションを先に進めるよう案内しているため、実質的にこのページを先頭から読むことになります。その後、このサブセクションの追加の変更を適用してください。

#### 追加の破壊的変更

1. **サンプリングパラメータの削除：** [サンプリングパラメータの削除](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#opus-46-breaking-changes)で説明しています。

2. **ツールバージョンの更新**

   <Warning>
     これは、Claude 3.xモデルから移行する場合の破壊的変更です。
   </Warning>

   現在のツールバージョンに更新してください。`undo_edit` コマンドを使用しているコードはすべて削除してください。

   <CodeGroup exclude="shell">
     ```python Python
     # 変更前
     tools = [{"type": "text_editor_20250124", "name": "str_replace_editor"}]

     # 変更後
     tools = [{"type": "text_editor_20250728", "name": "str_replace_based_edit_tool"}]
     ```

     ```typescript TypeScript
     // 変更前
     const legacyTools = [{ type: "text_editor_20250124", name: "str_replace_editor" }];

     // 変更後
     const tools = [{ type: "text_editor_20250728", name: "str_replace_based_edit_tool" }];
     ```

     ```csharp C#
     var parameters = new MessageCreateParams
     {
         // 変更前: {"type": "text_editor_20250124", "name": "str_replace_editor"}
         // 変更後:
         Tools = [new ToolTextEditor20250728()],
         // ...
     };
     ```

     ```go Go
     params := anthropic.MessageNewParams{
     	// 変更前: {"type": "text_editor_20250124", "name": "str_replace_editor"}
     	// 変更後:
     	Tools: []anthropic.ToolUnionParam{
     		{OfTextEditor20250728: &anthropic.ToolTextEditor20250728Param{}},
     	},
     	// ...
     }
     ```

     ```java Java
     MessageCreateParams params = MessageCreateParams.builder()
         // 変更前: {"type": "text_editor_20250124", "name": "str_replace_editor"}
         // 変更後:
         .addTool(ToolTextEditor20250728.builder().build())
         // ...
         .build();
     ```

     ```php PHP
     $message = $client->messages->create(
         // 変更前: ['type' => 'text_editor_20250124', 'name' => 'str_replace_editor']
         // 変更後:
         tools: [new ToolTextEditor20250728()],
         // ...
     );
     ```

     ```ruby Ruby
     # 変更前
     legacy_tools = [{type: "text_editor_20250124", name: "str_replace_editor"}]

     # 変更後
     tools = [{type: "text_editor_20250728", name: "str_replace_based_edit_tool"}]
     ```
   </CodeGroup>

   * **テキストエディタ：** `text_editor_20250728` と `str_replace_based_edit_tool` を使用してください。詳細については、[テキストエディタツール](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/text-editor-tool)のドキュメントを参照してください。
   * **コード実行：** `code_execution_20260521` にアップグレードしてください。移行手順については、[コード実行ツール](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/code-execution-tool#upgrade-to-latest-tool-version)のドキュメントを参照してください。
   * **コンピュータ使用：** Claude APIおよびGoogle Cloudでは、Claude Opus 5.5はコンピュータ使用を `computer_toolset_20260801` ツールセットとしてのみ受け付けます。これらの環境では、以前の `computer_20250124` および `computer_20251124` ツールは拒否されます。[コンピュータ使用の破壊的変更](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#computer-use-toolset)を参照してください。

3. **`refusal` 停止理由の処理**

   [`refusal` 停止理由を処理する](https://platform.claude.com/docs/ja/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals)ようにアプリケーションを更新してください。

   <CodeGroup exclude="shell">
     ```python Python
     response = client.messages.create(...)

     if response.stop_reason == "refusal":
         # 拒否を適切に処理する
         pass
     ```

     ```typescript TypeScript
     const response = await client.messages.create(/* ... */);

     if (response.stop_reason === "refusal") {
       // 拒否を適切に処理する
     }
     ```

     ```csharp C#
     var response = await client.Messages.Create(...);

     if (response.StopReason?.Value() == StopReason.Refusal)
     {
         // 拒否を適切に処理します
     }
     ```

     ```go Go
     response, _ := client.Messages.New(ctx, params) // your existing request

     if response.StopReason == anthropic.StopReasonRefusal {
     	// 拒否を適切に処理する
     }
     ```

     ```java Java
     Message response = client.messages().create(...);

     StopReason reason = response.stopReason().orElse(StopReason.END_TURN);
     if (reason.equals(StopReason.REFUSAL)) {
         // 拒否を適切に処理する
     }
     ```

     ```php PHP
     $response = $client->messages->create(...);

     if ($response->stopReason === 'refusal') {
         // 拒否を適切に処理する
     }
     ```

     ```ruby Ruby
     response = client.messages.create(...)

     if response.stop_reason == :refusal
       # 拒否を適切に処理する
     end
     ```
   </CodeGroup>

4. **`model_context_window_exceeded` 停止理由の処理**

   Claude 4.5以降のモデルは、リクエストで指定した `max_tokens` の上限ではなく、コンテキストウィンドウの上限に達して生成が停止した場合に、`model_context_window_exceeded` 停止理由を返します。この新しい停止理由を処理するようにアプリケーションを更新してください：

   <CodeGroup exclude="shell">
     ```python Python
     response = client.messages.create(...)

     if response.stop_reason == "model_context_window_exceeded":
         # コンテキストウィンドウの上限を適切に処理する
         pass
     ```

     ```typescript TypeScript
     const response = await client.messages.create(/* ... */);

     if (response.stop_reason === "model_context_window_exceeded") {
       // コンテキストウィンドウの上限を適切に処理する
     }
     ```

     ```csharp C#
     var response = await client.Messages.Create(...);

     if (response.StopReason?.Raw() == "model_context_window_exceeded")
     {
         // コンテキストウィンドウの上限を適切に処理する
     }
     ```

     ```go Go
     response, _ := client.Messages.New(ctx, params) // your existing request

     if response.StopReason == "model_context_window_exceeded" {
     	// コンテキストウィンドウの上限を適切に処理する
     }
     ```

     ```java Java
     Message response = client.messages().create(...);

     StopReason reason = response.stopReason().orElse(StopReason.END_TURN);
     if (reason.equals(StopReason.of("model_context_window_exceeded"))) {
         // コンテキストウィンドウの上限を適切に処理する
     }
     ```

     ```php PHP
     $response = $client->messages->create(...);

     if ($response->stopReason === 'model_context_window_exceeded') {
         // コンテキストウィンドウの上限を適切に処理する
     }
     ```

     ```ruby Ruby
     response = client.messages.create(...)

     if response.stop_reason == :model_context_window_exceeded
       # コンテキストウィンドウの上限を適切に処理する
     end
     ```
   </CodeGroup>

5. **ツールパラメータ処理の検証（末尾の改行）**

   以前のモデルでは、ツール呼び出しの文字列パラメータの末尾の改行が削除されていましたが、Claude 4.5以降のモデルではこれが保持されます。ツールがツール呼び出しパラメータとの文字列の完全一致に依存している場合は、末尾の改行が正しく処理されることを確認してください。

6. **動作の変更に合わせたプロンプトの更新**

   Claude 4以降のモデルは、より簡潔で直接的なコミュニケーションスタイルを持ち、明示的な指示を必要とします。最適化のガイダンスについては、[プロンプトのベストプラクティス](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/claude-prompting-best-practices)を確認してください。

#### 追加の推奨される変更

* **レガシーベータヘッダーの削除：** `token-efficient-tools-2025-02-19` と `output-128k-2025-02-19` を削除してください。Claude 4以降のすべてのモデルにはトークン効率の高いツール使用が組み込まれているため、これらのヘッダーは効果がありません。

## Claude Sonnet 5からClaude Opus 5.5への移行

[Claude Opus 5.5へのすべてのリクエストが満たす必要がある要件](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#request-requirements)、[すべてのレスポンスで思考を処理する](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#thinking-in-every-response)、[Claude Opus 5からClaude Opus 5.5への移行](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide#migrating-from-claude-opus-5)を順に進めてください。その際、置き換え対象のモデルIDは `claude-sonnet-5` と読み替えてください。Claude Sonnet 5はClaude Opus 5と同様に次の特徴を持つため、最後のセクションの内容はClaude Sonnet 5向けのコードにもそのまま当てはまります：

* デフォルトで思考が有効な状態で動作し、`thinking: {"type": "disabled"}` を受け付けます（Claude Sonnet 5の場合は、どのエフォートレベルでも受け付けます）。
* 強制的なツール選択と `computer_20251124` ツールを受け付けます。
* ツール呼び出し間のテキストを `text` ブロックとして返します。
* エフォートのデフォルトは `high` です。

手動の拡張思考、デフォルト以外のサンプリングパラメータ、アシスタントのプリフィルは、どちらのモデルでも400エラーを返すため、これらの点に変更はありません。Claude Opus 4.8、Claude Opus 4.7、Claude Opus 4.6の各セクションにある必須の変更は、いずれも該当しません。

### 変更点

1. **会話途中のシステムメッセージ：** Claude API、Amazon Bedrock、Google Cloudでは、Claude Opus 5.5は `messages` 配列内のユーザーターンの直後に `role: "system"` メッセージを配置できます（[配置ルール](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages#limitations)に従う必要があります）。この機能はClaude Sonnet 5では利用できません。指示を更新するためにメッセージ履歴全体を再構築するコードパスがある場合は、それを簡素化できます。また、以前のターンで[プロンプトキャッシング](https://platform.claude.com/docs/ja/build-with-claude/prompt-caching)のキャッシュヒットを維持できます。

2. **プロンプトキャッシングの最小長の引き下げ：** Claude Opus 5.5でキャッシュ可能なプロンプトの最小長は512トークンで、Claude Sonnet 5の1,024トークンから引き下げられました。Claude Sonnet 5では短すぎてキャッシュできなかったプロンプトでも、コードを変更せずにキャッシュエントリを作成できます。モデルごとの最小長については、[プロンプトキャッシング](https://platform.claude.com/docs/ja/build-with-claude/prompt-caching#cache-limitations)を参照してください。
