---
title: Claude Fable 5.1およびClaude Mythos 5.1移行ガイド
url: https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide
description: この移行ガイドを使用して、Claude Fable 5、Claude Mythos 5、Claude Opus 5、またはClaude Opus 4.8からClaude Fable 5.1およびClaude Mythos 5.1に切り替えます。Claude Fable 5.1およびClaude Mythos 5.1を有効にするためのガイダンスには、モデルID、破壊的変更、移行チェックリストが含まれます。
---

<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-fable-5-1に移行してください
  ```

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

[Claude Fable 5.1](https://platform.claude.com/docs/ja/models/fable-5-1/whats-new-fable-5-1)は、Claude Fable 5の後継モデルであり、入力および出力の価格は同じで、キャッシュ読み取りのコストは4分の1です。Claude API、[Amazon Bedrock](https://platform.claude.com/docs/ja/build-with-claude/claude-in-amazon-bedrock)、[Claude Platform on AWS](https://platform.claude.com/docs/ja/build-with-claude/claude-platform-on-aws)、[Google Cloud](https://platform.claude.com/docs/ja/build-with-claude/claude-on-vertex-ai)、および[Microsoft Foundry](https://platform.claude.com/docs/ja/build-with-claude/claude-in-microsoft-foundry)で利用できます。[Claude Mythos 5.1](https://platform.claude.com/docs/ja/models/mythos-5-1/overview)は同じ機能を備えており、[Cyber Verification Program](https://support.claude.com/en/articles/14604842)などのAnthropicの検証プログラムを通じて検証された組織のみが利用できます。動作の違いとプロンプトのパターンについては、[Claude Fable 5.1へのプロンプト](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-fable-5-1)を参照してください。

`claude-fable-5-1`と`claude-mythos-5-1`に共通する基本設定は次のとおりです。

* **思考：** [Adaptive thinking](https://platform.claude.com/docs/ja/build-with-claude/thinking)（適応型思考）は常に有効で、Claude Fable 5から変更はありません。モデルがいつ、どの程度思考するかを判断します。`thinking`の設定は不要です。`thinking: {type: "disabled"}`と手動の拡張思考（`thinking: {type: "enabled", budget_tokens: N}`）はどちらも400エラーを返します。
* **プリフィル：** アシスタントメッセージのプリフィルは400エラーを返し、Claude Fable 5から変更はありません。代わりにシステムプロンプトの指示を使用してください。
* **ツール選択：** `{type: "auto"}`（デフォルト）と`{type: "none"}`がサポートされています。`{type: "any"}`または`{type: "tool", name: "..."}`でツール呼び出しを強制すると400エラーが返されます。[破壊的変更](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-breaking-changes)を参照してください。
* **モデル間での思考の保持：** Claude Fable 5.1は、Claude Opus 5、Claude Fable 5、Claude Mythos 5、およびそれ以前のClaudeモデルの思考ブロックを読み取ります。これらのモデルはいずれもClaude Fable 5.1のブロックを読み取ることができません。[破壊的変更](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-breaking-changes)を参照してください。
* **コンテキストウィンドウと出力：** デフォルトで[100万トークンのコンテキストウィンドウ](https://platform.claude.com/docs/ja/build-with-claude/context-windows)を備え、リクエストあたり最大128kの出力トークンに対応します。
* **料金：** 入力トークン100万あたり10米ドル、出力トークン100万あたり50米ドルで、Claude Fable 5と同じです。プロンプトキャッシングのキャッシュ読み取りはトークン100万あたり0.25米ドルで、Claude Fable 5の料金の4分の1です。[Claudeの料金](https://platform.claude.com/docs/ja/about-claude/pricing)を参照してください。
* **データ保持：** どちらのモデルも30日間のデータ保持が必要であり、Anthropicが明示的に許可しない限り「zero data retention」（ゼロデータ保持）、すなわちZDRの取り決めの下では利用できず、Claude Fable 5およびClaude Mythos 5と同様にCovered Models（対象モデル）に指定されています。Claude APIでは、30日間の保持が設定されていない組織またはワークスペースからのリクエストは400 `invalid_request_error`を返します。ZDRの取り決めがある組織は、Anthropicのアカウントチームに連絡するか、ワークスペースごとに保持を設定してください。プラットフォームごとの詳細については、[モデル固有のデータ保持要件](https://platform.claude.com/docs/ja/manage-claude/api-and-data-retention#model-specific-data-retention-requirements)を参照してください。

2つのモデルの違いは次のとおりです。

* **提供状況：** Claude Fable 5.1はアクセス承認を必要としません。Claude Mythos 5.1は、[Cyber Verification Program](https://support.claude.com/en/articles/14604842)などのAnthropicの検証プログラムを通じて検証された組織のみが利用できます。アクセスをリクエストするには、ユースケースに対応するプログラムに申請するか、Anthropicのアカウントチームに連絡してください。
* **Priority Tier：** どちらのモデルも[Priority Tier](https://platform.claude.com/docs/ja/api/service-tiers#supported-models)ではサポートされていません。Claude Fable 5はサポートされています。

## Claude Fable 5からClaude Fable 5.1への移行

移行はほぼそのまま置き換えるだけで済みます。APIサーフェス、制限、トークンあたりの料金、トークナイザー、常時有効の適応型思考、拒否の処理、および`stop_details`のカテゴリはすべてClaude Fable 5と同じです。変更点は次のとおりです。強制的なツール選択は400エラーを返します。Claude Fable 5.1の思考ブロックを読み取れるのはClaude Fable 5.1とClaude Mythos 5.1のみで、それもブロックを生成した会話内に限られます。キャッシュ読み取りのコストが下がります。そしてエージェントループの動作が3つの点で異なります。同じ変更は[Claude Mythos 5.1](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#migrating-from-claude-mythos-5-to-claude-mythos-5-1)にも適用されますが、思考ブロックに対する会話チェックは例外で、Claude Mythos 5.1はこのチェックを実行しません。

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

```python
model = "claude-fable-5"  # Before
model = "claude-fable-5-1"  # After

# または、検証済みの組織に同じ機能を提供する Claude Mythos 5.1 の場合:
model = "claude-mythos-5-1"  # After
```

### 破壊的変更

1. **強制的なツール選択はサポートされていません：** Claude Fable 5は`tool_choice`の`auto`、`none`、`any`、`tool`を受け付けます。`claude-fable-5-1`では、`{type: "any"}`と`{type: "tool", name: "..."}`は400 `invalid_request_error`を返します：

   ```text wrap
   tool_choice: type "tool" and "any" are not supported for this model.
   ```

   このチェックは、Messages API、Message Batches API、および[トークンカウント](https://platform.claude.com/docs/ja/build-with-claude/token-counting)エンドポイントに適用されます。

   変更前（Claude Fable 5）：

   <CodeGroup>
     ```bash cURL
     curl -sS https://api.anthropic.com/v1/messages \
       -H "content-type: application/json" \
       -H "x-api-key: $ANTHROPIC_API_KEY" \
       -H "anthropic-version: 2023-06-01" \
       -d '{
         "model": "claude-fable-5",
         "max_tokens": 16000,
         "tools": [
           {
             "name": "record_summary",
             "description": "Record the structured summary of the document.",
             "input_schema": {
               "type": "object",
               "properties": {"summary": {"type": "string"}},
               "required": ["summary"]
             }
           }
         ],
         "tool_choice": {"type": "tool", "name": "record_summary"},
         "messages": [
           {"role": "user", "content": "Summarize: The meeting moved to Thursday."}
         ]
       }'
     ```

     ```bash CLI
     ant messages create <<'YAML'
     model: claude-fable-5
     max_tokens: 16000
     tools:
       - name: record_summary
         description: Record the structured summary of the document.
         input_schema:
           type: object
           properties:
             summary:
               type: string
           required: [summary]
     tool_choice:
       type: tool
       name: record_summary
     messages:
       - role: user
         content: "Summarize: The meeting moved to Thursday."
     YAML
     ```

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

     record_summary_tool = {
         "name": "record_summary",
         "description": "Record the structured summary of the document.",
         "input_schema": {
             "type": "object",
             "properties": {"summary": {"type": "string"}},
             "required": ["summary"],
         },
     }

     response = client.messages.create(
         model="claude-fable-5",
         max_tokens=16000,
         tools=[record_summary_tool],
         tool_choice={"type": "tool", "name": "record_summary"},
         messages=[{"role": "user", "content": "Summarize: The meeting moved to Thursday."}],
     )
     print(response.content)
     ```

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

     const response = await client.messages.create({
       model: "claude-fable-5",
       max_tokens: 16000,
       tools: [
         {
           name: "record_summary",
           description: "Record the structured summary of the document.",
           input_schema: {
             type: "object",
             properties: { summary: { type: "string" } },
             required: ["summary"]
           }
         }
       ],
       tool_choice: { type: "tool", name: "record_summary" },
       messages: [{ role: "user", content: "Summarize: The meeting moved to Thursday." }]
     });

     console.log(response.content);
     ```

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

     var parameters = new MessageCreateParams
     {
         Model = Model.ClaudeFable5,
         MaxTokens = 16000,
         Tools = [
             new ToolUnion(new Tool()
             {
                 Name = "record_summary",
                 Description = "Record the structured summary of the document.",
                 InputSchema = new InputSchema()
                 {
                     Properties = new Dictionary<string, JsonElement>
                     {
                         ["summary"] = JsonSerializer.SerializeToElement(new { type = "string" }),
                     },
                     Required = ["summary"],
                 },
             }),
         ],
         ToolChoice = new ToolChoiceTool { Name = "record_summary" },
         Messages = [
             new() { Role = Role.User, Content = "Summarize: The meeting moved to Thursday." }
         ]
     };

     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.ModelClaudeFable5,
     	MaxTokens: 16000,
     	Tools: []anthropic.ToolUnionParam{
     		{OfTool: &anthropic.ToolParam{
     			Name:        "record_summary",
     			Description: anthropic.String("Record the structured summary of the document."),
     			InputSchema: anthropic.ToolInputSchemaParam{
     				Properties: map[string]any{
     					"summary": map[string]any{"type": "string"},
     				},
     				Required: []string{"summary"},
     			},
     		}},
     	},
     	ToolChoice: anthropic.ToolChoiceUnionParam{OfTool: &anthropic.ToolChoiceToolParam{Name: "record_summary"}},
     	Messages: []anthropic.MessageParam{
     		anthropic.NewUserMessage(anthropic.NewTextBlock("Summarize: The meeting moved to Thursday.")),
     	},
     })
     if err != nil {
     	log.Fatal(err)
     }
     fmt.Println(response.RawJSON())
     ```

     ```java Java

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

         MessageCreateParams params = MessageCreateParams.builder()
             .model(Model.CLAUDE_FABLE_5)
             .maxTokens(16000L)
             .addTool(Tool.builder()
                 .name("record_summary")
                 .description("Record the structured summary of the document.")
                 .inputSchema(InputSchema.builder()
                     .properties(JsonValue.from(Map.of("summary", Map.of("type", "string"))))
                     .required(List.of("summary"))
                     .build())
                 .build())
             .toolChoice(ToolChoice.ofTool(ToolChoiceTool.builder()
                 .name("record_summary")
                 .build()))
             .addUserMessage("Summarize: The meeting moved to Thursday.")
             .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' => 'Summarize: The meeting moved to Thursday.']
         ],
         model: 'claude-fable-5',
         toolChoice: ['type' => 'tool', 'name' => 'record_summary'],
         tools: [
             [
                 'name' => 'record_summary',
                 'description' => 'Record the structured summary of the document.',
                 'input_schema' => [
                     'type' => 'object',
                     'properties' => [
                         'summary' => ['type' => 'string']
                     ],
                     'required' => ['summary']
                 ]
             ]
         ],
     );

     echo $message;
     ```

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

     message = client.messages.create(
       model: Anthropic::Model::CLAUDE_FABLE_5,
       max_tokens: 16000,
       tools: [
         {
           name: "record_summary",
           description: "Record the structured summary of the document.",
           input_schema: {
             type: "object",
             properties: { summary: { type: "string" } },
             required: ["summary"]
           }
         }
       ],
       tool_choice: { type: "tool", name: "record_summary" },
       messages: [
         { role: "user", content: "Summarize: The meeting moved to Thursday." }
       ]
     )
     puts message
     ```
   </CodeGroup>

   変更後（Claude Fable 5.1）：`tool_choice`は`auto`のままにし、指示の中でツール名を指定し、呼び出しがスキーマに一致するように`strict: true`を設定します。（[CMEK](https://platform.claude.com/docs/ja/manage-claude/cmek)組織では、`strict: true`を含む[構造化出力](https://platform.claude.com/docs/ja/build-with-claude/structured-outputs)がClaude Fableモデルで利用できないため、指示のみに頼ってください。）例：

   <CodeGroup>
     ```bash cURL
     curl -sS https://api.anthropic.com/v1/messages \
       -H "content-type: application/json" \
       -H "x-api-key: $ANTHROPIC_API_KEY" \
       -H "anthropic-version: 2023-06-01" \
       -d '{
         "model": "claude-fable-5-1",
         "max_tokens": 16000,
         "tools": [
           {
             "name": "record_summary",
             "description": "Record the structured summary of the document.",
             "strict": true,
             "input_schema": {
               "type": "object",
               "properties": {"summary": {"type": "string"}},
               "required": ["summary"],
               "additionalProperties": false
             }
           }
         ],
         "tool_choice": {"type": "auto"},
         "messages": [
           {"role": "user", "content": "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result."}
         ]
       }'
     ```

     ```bash CLI
     ant messages create <<'YAML'
     model: claude-fable-5-1
     max_tokens: 16000
     tools:
       - name: record_summary
         description: Record the structured summary of the document.
         strict: true
         input_schema:
           type: object
           properties:
             summary:
               type: string
           required: [summary]
           additionalProperties: false
     tool_choice:
       type: auto
     messages:
       - role: user
         content: "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result."
     YAML
     ```

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

     record_summary_tool = {
         "name": "record_summary",
         "description": "Record the structured summary of the document.",
         "strict": True,
         "input_schema": {
             "type": "object",
             "properties": {"summary": {"type": "string"}},
             "required": ["summary"],
             "additionalProperties": False,
         },
     }

     response = client.messages.create(
         model="claude-fable-5-1",
         max_tokens=16000,
         tools=[record_summary_tool],
         tool_choice={"type": "auto"},
         messages=[
             {
                 "role": "user",
                 "content": "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.",
             }
         ],
     )
     print(response.content)
     ```

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

     const response = await client.messages.create({
       model: "claude-fable-5-1",
       max_tokens: 16000,
       tools: [
         {
           name: "record_summary",
           description: "Record the structured summary of the document.",
           strict: true,
           input_schema: {
             type: "object",
             properties: { summary: { type: "string" } },
             required: ["summary"],
             additionalProperties: false
           }
         }
       ],
       tool_choice: { type: "auto" },
       messages: [
         {
           role: "user",
           content:
             "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result."
         }
       ]
     });

     console.log(response.content);
     ```

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

     var parameters = new MessageCreateParams
     {
         Model = Model.ClaudeFable5_1,
         MaxTokens = 16000,
         Tools = [
             new ToolUnion(new Tool()
             {
                 Name = "record_summary",
                 Description = "Record the structured summary of the document.",
                 Strict = true,
                 InputSchema = new InputSchema(new Dictionary<string, JsonElement>
                 {
                     ["properties"] = JsonSerializer.SerializeToElement(new Dictionary<string, object>
                     {
                         ["summary"] = new { type = "string" },
                     }),
                     ["required"] = JsonSerializer.SerializeToElement(new[] { "summary" }),
                     ["additionalProperties"] = JsonSerializer.SerializeToElement(false),
                 }),
             }),
         ],
         ToolChoice = new ToolChoiceAuto(),
         Messages = [
             new() { Role = Role.User, Content = "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result." }
         ]
     };

     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.ModelClaudeFable5_1,
     	MaxTokens: 16000,
     	Tools: []anthropic.ToolUnionParam{
     		{OfTool: &anthropic.ToolParam{
     			Name:        "record_summary",
     			Description: anthropic.String("Record the structured summary of the document."),
     			Strict:      anthropic.Bool(true),
     			InputSchema: anthropic.ToolInputSchemaParam{
     				Properties: map[string]any{
     					"summary": map[string]any{"type": "string"},
     				},
     				Required: []string{"summary"},
     				ExtraFields: map[string]any{
     					"additionalProperties": false,
     				},
     			},
     		}},
     	},
     	ToolChoice: anthropic.ToolChoiceUnionParam{OfAuto: &anthropic.ToolChoiceAutoParam{}},
     	Messages: []anthropic.MessageParam{
     		anthropic.NewUserMessage(anthropic.NewTextBlock("Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.")),
     	},
     })
     if err != nil {
     	log.Fatal(err)
     }
     fmt.Println(response.RawJSON())
     ```

     ```java Java

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

         MessageCreateParams params = MessageCreateParams.builder()
             .model(Model.CLAUDE_FABLE_5_1)
             .maxTokens(16000L)
             .addTool(Tool.builder()
                 .name("record_summary")
                 .description("Record the structured summary of the document.")
                 .inputSchema(InputSchema.builder()
                     .properties(JsonValue.from(Map.of("summary", Map.of("type", "string"))))
                     .putAdditionalProperty("required", JsonValue.from(List.of("summary")))
                     .putAdditionalProperty("additionalProperties", JsonValue.from(false))
                     .build())
                 .strict(true)
                 .build())
             .toolChoice(ToolChoice.ofAuto(ToolChoiceAuto.builder().build()))
             .addUserMessage("Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.")
             .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' => 'Summarize: The meeting moved to Thursday. Call the record_summary tool with your result.']
         ],
         model: 'claude-fable-5-1',
         toolChoice: ['type' => 'auto'],
         tools: [
             [
                 'name' => 'record_summary',
                 'description' => 'Record the structured summary of the document.',
                 'strict' => true,
                 'input_schema' => [
                     'type' => 'object',
                     'properties' => [
                         'summary' => ['type' => 'string']
                     ],
                     'required' => ['summary'],
                     'additionalProperties' => false
                 ]
             ]
         ],
     );

     echo $message;
     ```

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

     message = client.messages.create(
       model: "claude-fable-5-1",
       max_tokens: 16000,
       tools: [
         {
           name: "record_summary",
           description: "Record the structured summary of the document.",
           strict: true,
           input_schema: {
             type: "object",
             properties: { summary: { type: "string" } },
             required: ["summary"],
             additionalProperties: false
           }
         }
       ],
       tool_choice: { type: "auto" },
       messages: [
         { role: "user", content: "Summarize: The meeting moved to Thursday. Call the record_summary tool with your result." }
       ]
     )
     puts message
     ```
   </CodeGroup>

   [厳密なツール使用](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/strict-tool-use)および[ツール使用の強制](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/define-tools#forcing-tool-use)を参照してください。スキーマに準拠したJSONを得るためだけにツールを強制していた場合は、代わりに[JSON出力](https://platform.claude.com/docs/ja/build-with-claude/structured-outputs#usage)（`output_config.format`）を使用してください。

   ユーザーではなくアプリケーションが、マルチターン会話の現在のターンで特定のツール呼び出しを必要とする場合は、最新の`user`ターンの後に[会話途中のシステムメッセージ](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages)を追加します。ツール名を指定し、このターンでその呼び出しが必須であることを伝え、応答をその呼び出しから始めるようClaudeに指示します。メッセージはトップレベルの`system`プロンプトに書き込むのではなく追加されるため、以前のターンはバイト単位で同一のまま保たれ、[プロンプトキャッシング](https://platform.claude.com/docs/ja/build-with-claude/prompt-caching)のキャッシュヒットが維持されます：

   <CodeGroup>
     ```bash cURL
     curl -sS https://api.anthropic.com/v1/messages \
       -H "content-type: application/json" \
       -H "x-api-key: $ANTHROPIC_API_KEY" \
       -H "anthropic-version: 2023-06-01" \
       -d '{
         "model": "claude-fable-5-1",
         "max_tokens": 16000,
         "system": "You are a customer support assistant for an online electronics store.",
         "tools": [
           {
             "name": "search_help_center",
             "description": "Search the help center for policy and troubleshooting articles.",
             "strict": true,
             "input_schema": {
               "type": "object",
               "properties": {"query": {"type": "string"}},
               "required": ["query"],
               "additionalProperties": false
             }
           }
         ],
         "messages": [
           {"role": "user", "content": "My headphones from order A1234 arrived yesterday."},
           {"role": "assistant", "content": "Thanks for confirming. How can I help with order A1234?"},
           {"role": "user", "content": "I opened the box. Can I still return them?"},
           {
             "role": "system",
             "content": "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the latest message from the user. Begin your response with the search_help_center tool call. Do not reply with text only."
           }
         ]
       }'
     ```

     ```bash CLI
     ant messages create <<'YAML'
     model: claude-fable-5-1
     max_tokens: 16000
     system: You are a customer support assistant for an online electronics store.
     tools:
       - name: search_help_center
         description: Search the help center for policy and troubleshooting articles.
         strict: true
         input_schema:
           type: object
           properties:
             query:
               type: string
           required: [query]
           additionalProperties: false
     messages:
       - role: user
         content: My headphones from order A1234 arrived yesterday.
       - role: assistant
         content: Thanks for confirming. How can I help with order A1234?
       - role: user
         content: I opened the box. Can I still return them?
       - role: system
         content: >-
           Tool-use requirement for the current turn: the application requires a call
           to the search_help_center tool in your response to the user's latest message.
           Begin your response with the search_help_center tool call. Do not reply with
           text only.
     YAML
     ```

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

     search_help_center_tool = {
         "name": "search_help_center",
         "description": "Search the help center for policy and troubleshooting articles.",
         "strict": True,
         "input_schema": {
             "type": "object",
             "properties": {"query": {"type": "string"}},
             "required": ["query"],
             "additionalProperties": False,
         },
     }

     response = client.messages.create(
         model="claude-fable-5-1",
         max_tokens=16000,
         system="You are a customer support assistant for an online electronics store.",
         tools=[search_help_center_tool],
         messages=[
             {
                 "role": "user",
                 "content": "My headphones from order A1234 arrived yesterday.",
             },
             {
                 "role": "assistant",
                 "content": "Thanks for confirming. How can I help with order A1234?",
             },
             {"role": "user", "content": "I opened the box. Can I still return them?"},
             # このアプリケーションでは、ポリシーに関する回答の前に
             # ヘルプセンターの検索が必要です。この要件をシステムメッセージとして追加すると、
             # それ以前のターンは変更されずに残ります。
             {
                 "role": "system",
                 "content": "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only.",
             },
         ],
     )
     print(response.content)
     ```

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

     const response = await client.messages.create({
       model: "claude-fable-5-1",
       max_tokens: 16000,
       system: "You are a customer support assistant for an online electronics store.",
       tools: [
         {
           name: "search_help_center",
           description: "Search the help center for policy and troubleshooting articles.",
           strict: true,
           input_schema: {
             type: "object",
             properties: { query: { type: "string" } },
             required: ["query"],
             additionalProperties: false
           }
         }
       ],
       messages: [
         { role: "user", content: "My headphones from order A1234 arrived yesterday." },
         { role: "assistant", content: "Thanks for confirming. How can I help with order A1234?" },
         { role: "user", content: "I opened the box. Can I still return them?" },
         // このアプリケーションでは、ポリシーに関する回答の前に
         // ヘルプセンターの参照が必要です。この要件をシステムメッセージとして追加すると、
         // それ以前のターンは変更されません。
         {
           role: "system",
           content:
             "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."
         }
       ]
     });

     console.log(response.content);
     ```

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

     var parameters = new MessageCreateParams
     {
         Model = Model.ClaudeFable5_1,
         MaxTokens = 16000,
         System = "You are a customer support assistant for an online electronics store.",
         Tools = [
             new ToolUnion(new Tool()
             {
                 Name = "search_help_center",
                 Description = "Search the help center for policy and troubleshooting articles.",
                 Strict = true,
                 InputSchema = new InputSchema(new Dictionary<string, JsonElement>
                 {
                     ["properties"] = JsonSerializer.SerializeToElement(new Dictionary<string, object>
                     {
                         ["query"] = new { type = "string" },
                     }),
                     ["required"] = JsonSerializer.SerializeToElement(new[] { "query" }),
                     ["additionalProperties"] = JsonSerializer.SerializeToElement(false),
                 }),
             }),
         ],
         Messages = [
             new() { Role = Role.User, Content = "My headphones from order A1234 arrived yesterday." },
             new() { Role = Role.Assistant, Content = "Thanks for confirming. How can I help with order A1234?" },
             new() { Role = Role.User, Content = "I opened the box. Can I still return them?" },
             // このアプリケーションでは、ポリシーに関する回答の前に
             // ヘルプセンターの検索が必要です。この要件をシステムメッセージとして追加すると、
             // それ以前のターンは変更されません。
             new()
             {
                 Role = Role.System,
                 Content = "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."
             }
         ]
     };

     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.ModelClaudeFable5_1,
     	MaxTokens: 16000,
     	System: []anthropic.TextBlockParam{
     		{Text: "You are a customer support assistant for an online electronics store."},
     	},
     	Tools: []anthropic.ToolUnionParam{
     		{OfTool: &anthropic.ToolParam{
     			Name:        "search_help_center",
     			Description: anthropic.String("Search the help center for policy and troubleshooting articles."),
     			Strict:      anthropic.Bool(true),
     			InputSchema: anthropic.ToolInputSchemaParam{
     				Properties: map[string]any{
     					"query": map[string]any{"type": "string"},
     				},
     				Required: []string{"query"},
     				ExtraFields: map[string]any{
     					"additionalProperties": false,
     				},
     			},
     		}},
     	},
     	Messages: []anthropic.MessageParam{
     		anthropic.NewUserMessage(anthropic.NewTextBlock("My headphones from order A1234 arrived yesterday.")),
     		anthropic.NewAssistantMessage(anthropic.NewTextBlock("Thanks for confirming. How can I help with order A1234?")),
     		anthropic.NewUserMessage(anthropic.NewTextBlock("I opened the box. Can I still return them?")),
     		// このアプリケーションでは、ポリシーに関する回答の前に
     		// ヘルプセンターの検索が必要です。この要件をシステムメッセージとして追加すると、
     		// それ以前のターンは変更されません。
     		{
     			Role: anthropic.MessageParamRoleSystem,
     			Content: []anthropic.ContentBlockParamUnion{
     				anthropic.NewTextBlock("Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."),
     			},
     		},
     	},
     })
     if err != nil {
     	log.Fatal(err)
     }
     fmt.Println(response.RawJSON())
     ```

     ```java Java

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

         MessageCreateParams params = MessageCreateParams.builder()
             .model(Model.CLAUDE_FABLE_5_1)
             .maxTokens(16000L)
             .system("You are a customer support assistant for an online electronics store.")
             .addTool(Tool.builder()
                 .name("search_help_center")
                 .description("Search the help center for policy and troubleshooting articles.")
                 .inputSchema(InputSchema.builder()
                     .properties(JsonValue.from(Map.of("query", Map.of("type", "string"))))
                     .putAdditionalProperty("required", JsonValue.from(List.of("query")))
                     .putAdditionalProperty("additionalProperties", JsonValue.from(false))
                     .build())
                 .strict(true)
                 .build())
             .addUserMessage("My headphones from order A1234 arrived yesterday.")
             .addAssistantMessage("Thanks for confirming. How can I help with order A1234?")
             .addUserMessage("I opened the box. Can I still return them?")
             // このアプリケーションでは、ポリシーに関する回答の前にヘルプセンターの検索が必要です。
             // この要件をシステムメッセージとして追加すると、
             // それ以前のターンは変更されません。
             .addMessage(MessageParam.builder()
                 .role(MessageParam.Role.SYSTEM)
                 .content("Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only.")
                 .build())
             .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' => 'My headphones from order A1234 arrived yesterday.'],
             ['role' => 'assistant', 'content' => 'Thanks for confirming. How can I help with order A1234?'],
             ['role' => 'user', 'content' => 'I opened the box. Can I still return them?'],
             // このアプリケーションでは、ポリシーに関する回答の前に
             // ヘルプセンターの検索が必要です。この要件をシステムメッセージとして追加すると、
             // それ以前のターンは変更されないままになります。
             ['role' => 'system', 'content' => 'Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user\'s latest message. Begin your response with the search_help_center tool call. Do not reply with text only.']
         ],
         model: 'claude-fable-5-1',
         system: 'You are a customer support assistant for an online electronics store.',
         tools: [
             [
                 'name' => 'search_help_center',
                 'description' => 'Search the help center for policy and troubleshooting articles.',
                 'strict' => true,
                 'input_schema' => [
                     'type' => 'object',
                     'properties' => [
                         'query' => ['type' => 'string']
                     ],
                     'required' => ['query'],
                     'additionalProperties' => false
                 ]
             ]
         ],
     );

     echo $message;
     ```

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

     message = client.messages.create(
       model: "claude-fable-5-1",
       max_tokens: 16000,
       system: "You are a customer support assistant for an online electronics store.",
       tools: [
         {
           name: "search_help_center",
           description: "Search the help center for policy and troubleshooting articles.",
           strict: true,
           input_schema: {
             type: "object",
             properties: { query: { type: "string" } },
             required: ["query"],
             additionalProperties: false
           }
         }
       ],
       messages: [
         { role: "user", content: "My headphones from order A1234 arrived yesterday." },
         { role: "assistant", content: "Thanks for confirming. How can I help with order A1234?" },
         { role: "user", content: "I opened the box. Can I still return them?" },
         # このアプリケーションでは、ポリシーに関する回答の前に
         # ヘルプセンターの検索が必要です。この要件をシステムメッセージとして追加すると、
         # それ以前のターンは変更されません。
         {
           role: "system",
           content: "Tool-use requirement for the current turn: the application requires a call to the search_help_center tool in your response to the user's latest message. Begin your response with the search_help_center tool call. Do not reply with text only."
         }
       ]
     )
     puts message
     ```
   </CodeGroup>

   他のターンと同様に、以降のリクエストでも`role: "system"`メッセージを履歴に残してください。会話途中のシステムメッセージにはベータヘッダーは不要です。ツールを呼び出してはならないターンでは、引き続き`tool_choice: {"type": "none"}`が機能します。

2. **Claude Fable 5.1の思考ブロックを読み取れるのはClaude Fable 5.1とClaude Mythos 5.1のみです：** すべての`thinking`ブロックには、それを生成したモデルが記録されます。Claude Fable 5.1は、自身のブロックに加え、Claude Mythos 5.1、Claude Opus 5、Claude Fable 5、Claude Mythos 5、およびそれ以前のClaudeモデルのブロックを読み取ります。これらのいずれかから`claude-fable-5-1`に移行する会話は、以前の推論を保持します。この条件は一方向です。Claude Mythos 5.1を除き、これらのモデルはいずれもClaude Fable 5.1のブロックを読み取ることができません。

   Claude Fable 5.1で実行された会話は、ルーターの切り替え、クライアント側の再試行、または[サーバーサイドフォールバック](https://platform.claude.com/docs/ja/build-with-claude/refusals-and-fallback#server-side-fallback)を含む[分類器による拒否時のフォールバック](https://platform.claude.com/docs/ja/build-with-claude/refusals-and-fallback)によって、古いか新しいかを問わず別のモデルに移ることがあります。APIは、そのモデルが読み取れないブロックをモデルに渡す前に削除し、リクエストは成功し、削除された入力トークンは課金されません。移行先のモデルはその推論なしで計画を立て直すため、切り替え後の最初のターンでコストとレイテンシが増加する可能性があります。何が削除されたかを確認するには、`thinking-binding-controls-2026-08-01` [ベータヘッダー](https://platform.claude.com/docs/ja/api/beta-headers)を送信します。すると応答に`input_transformations`配列が含まれ、削除された各ブロックが`reason: "model_binding_mismatch"`とともに示されます。[会話の途中でのモデルの切り替え](https://platform.claude.com/docs/ja/build-with-claude/preserved-thinking#switching-models)を参照してください。

3. **以前のターンを編集すると思考ブロックが無効になります：** Claude Fable 5.1の各`thinking`ブロックは、それに先行する`system`プロンプト、`tools`、および会話履歴に対してのみ有効です。Claude Code、claude.ai、[Claude Managed Agents](https://platform.claude.com/docs/ja/managed-agents/overview)、または[Claude Agent SDK](https://code.claude.com/docs/ja/agent-sdk/overview)が会話履歴を管理している場合、そのプレフィックスはすでにそのまま保たれています。コードが`messages`配列を自分で構築している場合はこの項目が該当し、[保持された思考](https://platform.claude.com/docs/ja/build-with-claude/preserved-thinking)が完全な統合ガイドとなります。チェックが適用される場合、これらのいずれかが変更された後にブロックを送り返すリクエストは400エラーで拒否されます：

   ```text wrap
   messages.5.content.0: Invalid `signature` in `thinking` block. The block is bound to a different conversation. Remove the block, or set `thinking.block_binding.prefix_mismatch_behavior` to "drop_block". That setting requires the `thinking-binding-controls-2026-08-01` value in the `anthropic-beta` header.
   ```

   APIは、2026年8月31日以降に作成された新しいアカウントに対してこのチェックを適用します。それ以前に作成されたアカウントでは、APIは不一致を記録しますが、リクエストで`thinking.block_binding.prefix_mismatch_behavior`を設定して適用をオプトインしない限り、それに基づく処理は行いません。これらのアカウントで、`thinking-binding-controls-2026-08-01`ベータヘッダーを送信し、そのフィールドを未設定のままにすると、応答の`input_transformations`に、チェックに失敗した各ブロックが`thinking_mismatch_allowed`エントリとして一覧表示されます。アカウントの作成時期にかかわらず、アプリケーションをこのチェックに対応させてください。対応に使うパターンは、プロンプトキャッシングのキャッシュをウォームな状態に保つのにも役立ちます。また、`prefix_mismatch_behavior`を送信すれば、どのアカウントからでもこのチェックに対してテストできます。ユーザーが自分のAPIキーで実行するツールやフレームワークを提供する場合は、リリース前にこの方法でテストしてください。開発者のキーは古いアカウントのものである可能性が高く、新しいアカウントを使うユーザーのほうが先にこのチェックに引っかかるためです。自分のアカウントにデフォルトでチェックが適用されるかどうかを確認するには、ベータヘッダーを付けずに、履歴を編集するリクエストを送信します。ヘッダー名を示す400エラーが返された場合は、チェックが適用されています。

   このエラーは同じリクエストボディに対しては常に発生するため、自動再試行ループでは解消されません。失敗させずに、無効になった推論を除いて処理を続けるには、履歴から`thinking`ブロックを取り除いて一度だけ再試行するか、`thinking-binding-controls-2026-08-01` [ベータヘッダー](https://platform.claude.com/docs/ja/api/beta-headers)を送信して`prefix_mismatch_behavior`を`"drop_block"`に設定します（デフォルトは`"error"`）。`"drop_block"`を使用すると、APIは不一致のブロックと、会話内でそれ以降のすべての思考ブロックを削除し、それぞれを応答の`input_transformations`配列で`reason: "prefix_binding_mismatch"`とともに報告します：

   <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: thinking-binding-controls-2026-08-01" \
       -H "content-type: application/json" \
       -d '{
         "model": "claude-fable-5-1",
         "max_tokens": 16000,
         "thinking": {
           "type": "adaptive",
           "block_binding": {
             "prefix_mismatch_behavior": "drop_block"
           }
         },
         "messages": [
           {
             "role": "user",
             "content": "What is the greatest common divisor of 1071 and 462?"
           }
         ]
       }'
     ```

     ```bash CLI
     ant beta:messages create \
       --beta thinking-binding-controls-2026-08-01 \
       --transform '{content.#(type=="text")#.text,input_transformations}' \
       --format yaml <<'YAML'
     model: claude-fable-5-1
     max_tokens: 16000
     thinking:
       type: adaptive
       block_binding:
         prefix_mismatch_behavior: drop_block
     messages:
       - role: user
         content: What is the greatest common divisor of 1071 and 462?
     YAML
     ```

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

     response = client.beta.messages.create(
         model="claude-fable-5-1",
         max_tokens=16000,
         thinking={
             "type": "adaptive",
             "block_binding": {"prefix_mismatch_behavior": "drop_block"},
         },
         messages=[
             {
                 "role": "user",
                 "content": "What is the greatest common divisor of 1071 and 462?",
             }
         ],
         betas=["thinking-binding-controls-2026-08-01"],
     )

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

     print(f"Input transformations: {len(response.input_transformations or [])}")
     ```

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

     const response = await client.beta.messages.create({
       model: "claude-fable-5-1",
       max_tokens: 16000,
       thinking: {
         type: "adaptive",
         block_binding: { prefix_mismatch_behavior: "drop_block" }
       },
       messages: [
         { role: "user", content: "What is the greatest common divisor of 1071 and 462?" }
       ],
       betas: ["thinking-binding-controls-2026-08-01"]
     });

     for (const block of response.content) {
       if (block.type === "text") {
         console.log(block.text);
       }
     }
     console.log(`Input transformations: ${response.input_transformations?.length ?? 0}`);
     ```

     ```csharp C#
     using Anthropic.Models.Beta;
     using Anthropic.Models.Beta.Messages;
     using Model = Anthropic.Models.Messages.Model;

     AnthropicClient client = new();

     var response = await client.Beta.Messages.Create(
         new()
         {
             Model = Model.ClaudeFable5_1,
             MaxTokens = 16000,
             Thinking = new BetaThinkingConfigAdaptive
             {
                 BlockBinding = new()
                 {
                     PrefixMismatchBehavior = BetaThinkingPrefixMismatchBehavior.DropBlock,
                 },
             },
             Messages =
             [
                 new()
                 {
                     Role = Role.User,
                     Content = "What is the greatest common divisor of 1071 and 462?",
                 },
             ],
             Betas = [AnthropicBeta.ThinkingBindingControls2026_08_01],
         }
     );

     foreach (var block in response.Content)
     {
         if (block.TryPickText(out var textBlock))
         {
             Console.WriteLine(textBlock.Text);
         }
     }

     Console.WriteLine($"Input transformations: {response.InputTransformations?.Count ?? 0}");
     ```

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

     response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{
     	Model:     anthropic.ModelClaudeFable5_1,
     	MaxTokens: 16000,
     	Thinking: anthropic.BetaThinkingConfigParamUnion{
     		OfAdaptive: &anthropic.BetaThinkingConfigAdaptiveParam{
     			BlockBinding: anthropic.BetaThinkingBlockBindingParam{
     				PrefixMismatchBehavior: anthropic.BetaThinkingPrefixMismatchBehaviorDropBlock,
     			},
     		},
     	},
     	Messages: []anthropic.BetaMessageParam{
     		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("What is the greatest common divisor of 1071 and 462?")),
     	},
     	Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaThinkingBindingControls2026_08_01},
     })
     if err != nil {
     	log.Fatal(err)
     }

     for _, block := range response.Content {
     	if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {
     		fmt.Println(textBlock.Text)
     	}
     }
     fmt.Printf("Input transformations: %d\n", len(response.InputTransformations))
     ```

     ```java Java
     import com.anthropic.models.beta.AnthropicBeta;
     import com.anthropic.models.beta.messages.BetaMessage;
     import com.anthropic.models.beta.messages.BetaThinkingBlockBinding;
     import com.anthropic.models.beta.messages.BetaThinkingConfigAdaptive;
     import com.anthropic.models.beta.messages.BetaThinkingPrefixMismatchBehavior;
     import com.anthropic.models.beta.messages.MessageCreateParams;
     import com.anthropic.models.messages.Model;

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

         MessageCreateParams params = MessageCreateParams.builder()
             .model(Model.CLAUDE_FABLE_5_1)
             .maxTokens(16000L)
             .addBeta(AnthropicBeta.THINKING_BINDING_CONTROLS_2026_08_01)
             .thinking(BetaThinkingConfigAdaptive.builder()
                 .blockBinding(BetaThinkingBlockBinding.builder()
                     .prefixMismatchBehavior(BetaThinkingPrefixMismatchBehavior.DROP_BLOCK)
                     .build())
                 .build())
             .addUserMessage("What is the greatest common divisor of 1071 and 462?")
             .build();

         BetaMessage response = client.beta().messages().create(params);

         response.content().stream()
             .flatMap(block -> block.text().stream())
             .forEach(textBlock -> IO.println(textBlock.text()));
         IO.println("Input transformations: "
             + response.inputTransformations().map(List::size).orElse(0));
     }
     ```

     ```php PHP
     use Anthropic\Beta\AnthropicBeta;
     use Anthropic\Beta\Messages\BetaThinkingBlockBinding;
     use Anthropic\Beta\Messages\BetaThinkingConfigAdaptive;
     use Anthropic\Beta\Messages\BetaThinkingPrefixMismatchBehavior;
     use Anthropic\Client;

     $client = new Client();

     $response = $client->beta->messages->create(
         model: 'claude-fable-5-1',
         maxTokens: 16000,
         thinking: BetaThinkingConfigAdaptive::with(
             blockBinding: BetaThinkingBlockBinding::with(
                 prefixMismatchBehavior: BetaThinkingPrefixMismatchBehavior::DROP_BLOCK,
             ),
         ),
         messages: [
             ['role' => 'user', 'content' => 'What is the greatest common divisor of 1071 and 462?'],
         ],
         betas: [AnthropicBeta::THINKING_BINDING_CONTROLS_2026_08_01],
     );

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

     echo 'Input transformations: ', count($response->inputTransformations ?? []), PHP_EOL;
     ```

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

     response = client.beta.messages.create(
       model: "claude-fable-5-1",
       max_tokens: 16_000,
       thinking: {
         type: "adaptive",
         block_binding: {prefix_mismatch_behavior: "drop_block"}
       },
       messages: [
         {role: "user", content: "What is the greatest common divisor of 1071 and 462?"}
       ],
       betas: [Anthropic::AnthropicBeta::THINKING_BINDING_CONTROLS_2026_08_01]
     )

     response.content.each do |block|
       puts block.text if block.type == :text
     end

     puts "Input transformations: #{response.input_transformations&.length || 0}"
     ```
   </CodeGroup>

   [トークンカウント](https://platform.claude.com/docs/ja/build-with-claude/token-counting)エンドポイントも同じチェックを実行します。応答の形式とストリーミングでの配置については、[保持されないブロックの制御（ベータ）](https://platform.claude.com/docs/ja/build-with-claude/thinking#preserved-thinking-controls)を参照してください。

   以降の思考ブロックを無効にするパターンと、その代わりに行うべきことは次のとおりです。

   * 以前のターンの編集、並べ替え、または削除。これには、古いツール結果の削除、トランスクリプトの途中からのターンの切り取り、および最近のターンとその思考ブロックを要約の後ろにそのまま残すクライアント側のコンパクション（数ターン後に要約を差し替えるバックグラウンドコンパクションを含む）が含まれます。代わりに、サーバー側の[コンパクション](https://platform.claude.com/docs/ja/build-with-claude/compaction)または[コンテキスト編集](https://platform.claude.com/docs/ja/build-with-claude/context-editing)（古いツール結果には[ツール結果のクリア](https://platform.claude.com/docs/ja/build-with-claude/context-editing#tool-result-clearing)）を使用するか、[サーバー上でコンテキストを削減する](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-trim-context)にあるクライアント側コンパクションの形式のいずれかを使用してください。
   * 永続化しないコンテンツの挿入。たとえば、`tool_result`ブロックの後に追加され、次のリクエストで削除されるターンごとのリマインダーなどです。代わりに、リマインダーを[ターンスコープのシステムメッセージ](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages)として送信し、履歴に残してください。
   * 同じ会話内のリクエスト間でトップレベルの`system`プロンプトまたは`tools`配列を再構築すること。たとえば、現在の日付を更新したり、ツールを追加または削除したりする場合です。代わりに、新しい指示（「現在の日付は2026-09-14です。」）または`tool_addition`および`tool_removal`ブロックを含む[会話途中のシステムメッセージ](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages)を追加してください。開始時に`tools`で宣言されていなかったツールは、[`tool_addition`ブロック内で定義](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages#define-tools-in-a-message-beta)できます（ベータヘッダー`inline-tools-2026-09-15`）。
   * 後のリクエストで異なるバイトを返す画像またはドキュメントのURL。チェックはURL文字列ではなくバイトを対象とするため、同じファイルを指す署名付きURLがローテーションしても問題ありません。ターンをまたいで参照するコンテンツについては、[Files API](https://platform.claude.com/docs/ja/build-with-claude/files)で一度アップロードして`file_id`を送信するか、base64で送信してください。

   これらの代替手段はいずれも、以前のターンをバイト単位で同一に保ち、履歴、`system`プロンプト、または`tools`配列を編集すると失われる[プロンプトキャッシング](https://platform.claude.com/docs/ja/build-with-claude/prompt-caching)のキャッシュヒットを維持します。

   引き続き問題なく機能するパターンは次のとおりです。

   * 追記のみの履歴：ターンを追加し、以前のターンを送受信したとおりに正確に渡し返すこと（追加された`role: "system"`メッセージを含む）。
   * 以前のアシスタントターンから、古いものから順に思考ブロックを削除すること。
   * `effort`、`max_tokens`、または`system`、`tools`、`messages`以外のリクエストパラメータを変更すること、および`cache_control`マーカーを追加または移動すること。
   * [思考ブロックのクリア](https://platform.claude.com/docs/ja/build-with-claude/context-editing#thinking-block-clearing)を含む、サーバー側のコンパクションとコンテキスト編集。チェックは送信したとおりの会話を比較するため、これらは編集とはみなされません。

   既存の統合を確認する手順は次のとおりです。

   1. 通常の数ターンにわたって送信される正確なリクエストボディを取得します。製品にコンパクションやツールの変更がある場合はそれも含めます。連続する各リクエストのペアについて、`system`プロンプト、`tools`配列、および`messages`の共通プレフィックスを比較します。新たに追加されたターンまでは、バイト単位で同一である必要があります。想定される例外は、[オンデマンドコンパクション](https://platform.claude.com/docs/ja/build-with-claude/compaction-on-demand)による署名付き`compaction`ブロックを差し込むリクエストです。このブロックは`messages`の先頭で要約対象のメッセージを置き換え、それ以降はすべて一致している必要があります。
   2. `thinking-binding-controls-2026-08-01`ベータヘッダーと`prefix_mismatch_behavior: "drop_block"`を使用して`claude-fable-5-1`に対して通常のマルチターンセッションを実行し、すべての応答で`input_transformations`をログに記録します。すべてのターンで配列が空であれば、履歴はそのまま保たれています。`reason: "prefix_binding_mismatch"`のエントリは、前回のリクエスト以降に`path`のブロックより前の何かが変更されたことを意味します。`reason: "model_binding_mismatch"`のエントリは会話がモデルを切り替えたことを意味し、コードのバグではありません。このフィールドを設定するとリクエストが適用対象にオプトインされるため、どのアカウントからでも機能します。CIでは、編集があった場合に実行が失敗するよう、代わりに`"error"`を設定してください。
   3. 本番環境の設定を選択します。プレフィックスの不一致がコードのバグしか意味しない場合はデフォルトの`"error"`のままにするか、失敗させる代わりに影響を受けるブロックを削除するには`"drop_block"`を設定し、いずれの場合も400エラーまたは`input_transformations`エントリを監視してください。

   たとえばコンパクションの境界で一度だけ思考ブロックを削除しても、影響はほとんどありません。リクエストのたびに以前の思考を無効にする統合では、プロンプトキャッシングのキャッシュが毎回最初から作り直されるため、タスクあたりのコストが増加する可能性があります（[会話履歴を追記専用に保つ](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#keep-the-conversation-history-append-only)を参照）。

### 動作の変更

1. **長いエージェントループでの並列ツール呼び出しの減少：** 長時間実行されるループでは、Claude Fable 5.1がターンごとに1つしかツール呼び出しを発行しないことがあります。これは、次に行うべき独立した読み取りがタスクから暗示されているだけの場合に起こります（カスタムコーディングエージェント、bashとエディタのハーネス、computer useなど）。ターンが1つ増えるごとに、トークン、往復通信、実時間のコストがかかります。対策として、各ユーザーメッセージの後に、バッチ処理を促す1文の指示を追加してください。追加方法は、[ターンスコープのシステムメッセージ](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages)（`clear_at: "next_user_message"`、ベータ）として送信するか、ベータを使用しない場合は`tool_result`ブロックの後のテキストブロックに含めます。以降のリクエストでも、以前に追加した指示は履歴に残してください。[エージェントループで独立したツール呼び出しをバッチ処理する](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#batch-independent-tool-calls-in-agent-loops)を参照してください。

2. **ツール呼び出し間の進捗メッセージの減少：** Claude Fable 5.1は、長いツールシーケンスの間に書くステータス更新がClaude Fable 5より少なく、エージェント型コーディングの要約も短くなっています。インターフェースでこれらの更新を表示する場合は、`thinking.display`を`"updates"`（ベータ）または`"summarized"`に設定し、プロンプトで更新を明示的に求めてください。[ツール呼び出し間の進捗更新](https://platform.claude.com/docs/ja/build-with-claude/thinking#progress-updates)と[ユーザー向けの進捗更新を求める](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#ask-for-user-facing-progress-updates)を参照してください。

3. **低いeffortでの検索・取得呼び出しの減少：** `low` effortでは、Claude Fable 5.1はClaude Fable 5よりも、検索ツールや取得ツールを呼び出さずに記憶から回答することが多くなります。製品が低いeffortでの取得に依存している場合は、該当するリクエストのeffortを上げるか、いつ検索すべきかをモデルに伝えてください。[低いeffortでの検索のトリガー](https://platform.claude.com/docs/ja/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#search-triggering-at-low-effort)を参照してください。

文章の密度、チャットの書式、要約での引用、ファイル編集にも違いがありますが、これらはAPI統合には影響しません。詳細については、[Claude Fable 5からの変更点](https://platform.claude.com/docs/ja/models/fable-5-1/whats-new-fable-5-1#changed-from-claude-fable-5)を参照してください。

### 推奨される変更

これらの変更は必須ではありませんが、それぞれがコストやレイテンシを下げるか、障害モードを取り除きます：

1. **会話途中でeffortを変更する（ベータ）：** Claude Fable 5では、`output_config.effort`はリクエストレベルであり、リクエスト間で変更すると以前のターンのキャッシュされたプレフィックスが失われます。`claude-fable-5-1`では、`output_config`のみを含む`role: "system"`メッセージにより、[プロンプトキャッシング](https://platform.claude.com/docs/ja/build-with-claude/prompt-caching)のキャッシュを無効にすることなく、難しいステップではeffortを上げ、定型的なステップでは下げることができます：

   <CodeGroup>
     ```bash cURL
     # effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
     curl https://api.anthropic.com/v1/messages \
       -H "x-api-key: $ANTHROPIC_API_KEY" \
       -H "anthropic-version: 2023-06-01" \
       -H "anthropic-beta: mid-conversation-output-config-2026-07-01" \
       -H "content-type: application/json" \
       -d '{
         "model": "claude-fable-5-1",
         "max_tokens": 4096,
         "output_config": {"effort": "high"},
         "messages": [
           {"role": "user", "content": "Plan a migration from SQLite to PostgreSQL in three short steps."},
           {"role": "assistant", "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
           {"role": "system", "content": [], "output_config": {"effort": "low"}},
           {"role": "user", "content": "Summarize the plan in one sentence."}
         ]
       }'
     ```

     ```bash CLI
     ant beta:messages create \
       --beta mid-conversation-output-config-2026-07-01 \
       --transform 'content.#(type=="text").text' \
       --raw-output <<'YAML'
     model: claude-fable-5-1
     max_tokens: 4096
     output_config:
       effort: high
     messages:
       - role: user
         content: Plan a migration from SQLite to PostgreSQL in three short steps.
       - role: assistant
         content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
       # effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
       - role: system
         content: []
         output_config:
           effort: low
       - role: user
         content: Summarize the plan in one sentence.
     YAML
     ```

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

     response = client.beta.messages.create(
         model="claude-fable-5-1",
         max_tokens=4096,
         output_config={"effort": "high"},
         messages=[
             {
                 "role": "user",
                 "content": "Plan a migration from SQLite to PostgreSQL in three short steps.",
             },
             {
                 "role": "assistant",
                 "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.",
             },
             # effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
             {"role": "system", "content": [], "output_config": {"effort": "low"}},
             {"role": "user", "content": "Summarize the plan in one sentence."},
         ],
         betas=["mid-conversation-output-config-2026-07-01"],
     )

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

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

     const response = await client.beta.messages.create({
       model: "claude-fable-5-1",
       max_tokens: 4096,
       output_config: { effort: "high" },
       messages: [
         {
           role: "user",
           content: "Plan a migration from SQLite to PostgreSQL in three short steps."
         },
         {
           role: "assistant",
           content:
             "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
         },
         // effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
         { role: "system", content: [], output_config: { effort: "low" } },
         { role: "user", content: "Summarize the plan in one sentence." }
       ],
       betas: ["mid-conversation-output-config-2026-07-01"]
     });

     for (const block of response.content) {
       if (block.type === "text") {
         console.log(block.text);
       }
     }
     ```

     ```csharp C#
     using Anthropic.Models.Beta;
     using Anthropic.Models.Beta.Messages;
     using Model = Anthropic.Models.Messages.Model;

     AnthropicClient client = new();

     var response = await client.Beta.Messages.Create(new MessageCreateParams
     {
         Model = Model.ClaudeFable5_1,
         MaxTokens = 4096,
         OutputConfig = new() { Effort = Effort.High },
         Messages =
         [
             new() { Role = Role.User, Content = "Plan a migration from SQLite to PostgreSQL in three short steps." },
             new() { Role = Role.Assistant, Content = "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts." },
             // effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
             new()
             {
                 Role = Role.System,
                 Content = new([]),
                 OutputConfig = new() { Effort = BetaSystemMessageOutputConfigEffort.Low },
             },
             new() { Role = Role.User, Content = "Summarize the plan in one sentence." },
         ],
         Betas = [AnthropicBeta.MidConversationOutputConfig2026_07_01],
     });

     foreach (var block in response.Content)
     {
         if (block.TryPickText(out var textBlock))
         {
             Console.WriteLine(textBlock.Text);
         }
     }
     ```

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

     response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
     	Model:     anthropic.ModelClaudeFable5_1,
     	MaxTokens: 4096,
     	OutputConfig: anthropic.BetaOutputConfigParam{
     		Effort: anthropic.BetaOutputConfigEffortHigh,
     	},
     	Messages: []anthropic.BetaMessageParam{
     		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Plan a migration from SQLite to PostgreSQL in three short steps.")),
     		{
     			Role:    anthropic.BetaMessageParamRoleAssistant,
     			Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")},
     		},
     		// effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
     		anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{
     			Effort: anthropic.BetaSystemMessageOutputConfigEffortLow,
     		}),
     		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Summarize the plan in one sentence.")),
     	},
     	Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaMidConversationOutputConfig2026_07_01},
     })
     if err != nil {
     	log.Fatal(err)
     }

     for _, block := range response.Content {
     	if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {
     		fmt.Println(textBlock.Text)
     	}
     }
     ```

     ```java Java
     import com.anthropic.models.beta.AnthropicBeta;
     import com.anthropic.models.beta.messages.BetaMessage;
     import com.anthropic.models.beta.messages.BetaMessageParam;
     import com.anthropic.models.beta.messages.BetaOutputConfig;
     import com.anthropic.models.beta.messages.BetaSystemMessageOutputConfig;
     import com.anthropic.models.beta.messages.MessageCreateParams;
     import com.anthropic.models.messages.Model;

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

         MessageCreateParams params = MessageCreateParams.builder()
             .model(Model.CLAUDE_FABLE_5_1)
             .maxTokens(4096L)
             .addBeta(AnthropicBeta.MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01)
             .outputConfig(BetaOutputConfig.builder()
                 .effort(BetaOutputConfig.Effort.HIGH)
                 .build())
             .addUserMessage("Plan a migration from SQLite to PostgreSQL in three short steps.")
             .addAssistantMessage("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")
             // effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
             .addMessage(BetaMessageParam.builder()
                 .role(BetaMessageParam.Role.SYSTEM)
                 .contentOfBetaContentBlockParams(List.of())
                 .outputConfig(BetaSystemMessageOutputConfig.builder()
                     .effort(BetaSystemMessageOutputConfig.Effort.LOW)
                     .build())
                 .build())
             .addUserMessage("Summarize the plan in one sentence.")
             .build();

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

     ```php PHP
     use Anthropic\Beta\AnthropicBeta;
     use Anthropic\Beta\Messages\BetaMessageParam;
     use Anthropic\Beta\Messages\BetaOutputConfig;
     use Anthropic\Beta\Messages\BetaSystemMessageOutputConfig;
     use Anthropic\Client;

     $client = new Client();

     $response = $client->beta->messages->create(
         model: 'claude-fable-5-1',
         maxTokens: 4096,
         outputConfig: BetaOutputConfig::with(effort: 'high'),
         messages: [
             BetaMessageParam::with(role: 'user', content: 'Plan a migration from SQLite to PostgreSQL in three short steps.'),
             BetaMessageParam::with(role: 'assistant', content: '1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.'),
             // effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
             BetaMessageParam::with(
                 role: 'system',
                 content: [],
                 outputConfig: BetaSystemMessageOutputConfig::with(effort: 'low'),
             ),
             BetaMessageParam::with(role: 'user', content: 'Summarize the plan in one sentence.'),
         ],
         betas: [AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01],
     );

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

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

     response = client.beta.messages.create(
       model: "claude-fable-5-1",
       max_tokens: 4096,
       output_config: {effort: :high},
       messages: [
         {role: "user", content: "Plan a migration from SQLite to PostgreSQL in three short steps."},
         {role: "assistant", content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
         # effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
         {role: "system", content: [], output_config: {effort: :low}},
         {role: "user", content: "Summarize the plan in one sentence."}
       ],
       betas: [Anthropic::AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01]
     )

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

   この例のように`assistant`ターンと次の`user`ターンの間に配置すると、メッセージはその`user`ターンから有効になります。新しい入力を含む`user`ターンの直後に配置すると、そのターンに対するClaudeの応答のレベルを設定します。ツール結果のみを含む`user`ターンは新しい入力とはみなされないため、変更は新しい入力を含む次の`user`ターンまで待機します。その後、別の`role: "system"`メッセージで変更されるまでそのレベルが維持されます。名前付きのレベル（`low`、`medium`、`high`、`xhigh`、`max`）のみが受け付けられ、`mid-conversation-output-config-2026-07-01`ベータヘッダーが必要です。[メッセージごとのeffort](https://platform.claude.com/docs/ja/build-with-claude/effort#change-effort-mid-conversation-beta)を参照してください。

2. **会話途中のシステムメッセージで指示とツールを変更する：** セッションの途中で指示やツールを変更するには、[`role: "system"`メッセージ](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages)を追加し、ツールの変更には`tool_addition`および`tool_removal`ブロックを使用します（Claude APIではベータヘッダー`inline-tools-2026-09-15`）。`tool_addition`ブロックは、セッション開始時に`tools`で宣言されたツールを名前で指定するか、[ツールの完全な定義を含める](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages#define-tools-in-a-message-beta)ことができるため、セッション開始時に不明なツールを`tools`に含める必要はありません。これにより、以前のターンのプロンプトキャッシングのキャッシュヒットが維持され、会話履歴が追記のみに保たれます。古い`mid-conversation-tool-changes-2026-07-01`ヘッダーは、Claude API、Amazon Bedrock、およびGoogle Cloudで、ツールを参照によって指定する変更に対して引き続き機能します。現在のターンで特定のツールを実行する必要がある場合、同じメッセージが強制的な`tool_choice`の代わりになります（[破壊的変更](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-breaking-changes)を参照）。1つのターンにのみ適用されるリマインダーについては、`clear_at: "next_user_message"`を指定した別のテキストのみの`role: "system"`メッセージとして送信し（[ターンスコープのシステムメッセージ](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages)、ベータヘッダー`mid-conversation-system-clear-at-2026-08-21`）、履歴に残してください。このメッセージは次のユーザーメッセージの後はレンダリングされなくなり、クリアされた後はトークンを消費しません。`tool_addition`または`tool_removal`ブロックを含むメッセージはターンスコープにできません。

3. **拒否には`fallbacks: "default"`を使用する：** 引き続き`stop_reason: "refusal"`を処理し、応答コンテンツの前に`stop_details.category`を読み取ってください。拒否されたリクエストを別のモデルで自動的に再実行するには、`fallbacks: "default"`を設定します（ベータ、`server-side-fallback-2026-07-01`ヘッダー）。`"default"`は、拒否されたリクエストを、そのカテゴリに対してAnthropicが推奨するモデルで再試行します。Claude Fable 5.1で許可されるフォールバック先は、Claude Opus 4.8（`claude-opus-4-8`）とClaude Opus 5（`claude-opus-5`）です。明示的な`fallbacks`リストではどちらも指定できます。フォールバックモデルはClaude Fable 5.1の思考ブロックを受け取りません。`fallbacks`パラメータはAmazon Bedrock、Google Cloud、またはMicrosoft Foundryでは利用できません。これらのプラットフォームでは、代わりに[クライアント側フォールバック](https://platform.claude.com/docs/ja/build-with-claude/refusals-and-fallback#client-side-fallback)を使用してください。再試行を自分で構築する場合、[フォールバッククレジット](https://platform.claude.com/docs/ja/build-with-claude/fallback-credit)はClaude Fable 5と同じ条件で適用されます。[拒否とフォールバック](https://platform.claude.com/docs/ja/build-with-claude/refusals-and-fallback)を参照してください。

4. **`high` effortから始めてスイープする：** [effortパラメータ](https://platform.claude.com/docs/ja/build-with-claude/effort)のデフォルトは`high`で、5つのレベルすべてがサポートされています。Claude Fable 5のガイダンスはそのまま適用されます。ほとんどの作業には`high`を使用し、`medium`はテストする価値のあるコスト管理手段です。Claude Fable 5.1のClaude Fable 5に対する向上は`xhigh`と`max`で最も大きくなりますが、これらのレベルでは思考時間と最初の応答までの時間も増加するため、最も能力が求められるタスクや、評価で向上が示される場合にこれらのレベルに引き上げてください。Claude Fable 5向けに調整された設定を引き継ぐのではなく、独自の評価で新たにスイープを実行してください。[Claude Fable 5.1の推奨エフォートレベル](https://platform.claude.com/docs/ja/build-with-claude/effort#recommended-effort-levels-for-claude-fable-5-1)を参照してください。

5. **サーバー上でコンテキストを削減するか、古い思考を含まない形式でコンパクションする：** コードがクライアント上で古いターンを切り詰めたり要約したりしている場合、最も簡単な修正は、その処理をサーバー側の[コンパクション](https://platform.claude.com/docs/ja/build-with-claude/compaction)または[コンテキスト編集](https://platform.claude.com/docs/ja/build-with-claude/context-editing)に移すことです。[履歴チェック](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking)は送信したとおりの会話を比較するため、どちらも編集とはみなされず、それらが削除したものによって以降の思考ブロックが無効になることはありません。また、コンパクションの[`instructions`パラメータ](https://platform.claude.com/docs/ja/build-with-claude/compaction-threshold#custom-summarization-instructions)は独自の要約プロンプトを受け付けます。最近のターンを要約の後ろにそのまま残す場合や、会話を続けながらバックグラウンドで要約する場合は、クライアントが書いた要約ではなく[オンデマンドコンパクション](https://platform.claude.com/docs/ja/build-with-claude/compaction-on-demand)（ベータヘッダー`compact-2026-09-04`）を使用してください。APIは署名付きの要約ブロックを書き出し、それを要約対象のメッセージの代わりに配置します。残したターン内の思考ブロックは、[コンパクションと思考の保持](https://platform.claude.com/docs/ja/build-with-claude/compaction-thinking-blocks#conditions-for-kept-thinking-to-stay-valid)の条件の下で有効なまま保たれます。コンパクションをクライアント上で行う場合は、次の3つの形式のいずれかを選択してください：

   * **シンプルなコンパクション（推奨）：** 履歴全体を1つの要約メッセージと新しいユーザーターンに置き換え、それ以外は何も再送しません。思考ブロックは引き継がれないため、何も失敗しません。Claudeモデルはこの方式で長期的なタスクについて訓練されており、ほとんどのワークロードでより複雑な方式と同等のパフォーマンスを発揮します。
   * **末尾保持コンパクション：** 最近のターンを要約の後ろにそのまま残す場合は、それらのターンから`thinking`および`redacted_thinking`ブロックを取り除くか（テキストとツール呼び出しは残せます）、`prefix_mismatch_behavior: "drop_block"`を設定してください。それらの思考は完全な履歴に対して生成されたものであり、そうしないと要約の後ろでは失敗します。
   * **バックグラウンドコンパクション：** クリティカルパスの外で要約を構築して後で差し替える場合、その間に生成されたすべてのターンには、差し替え前の思考が含まれます。差し替え前に生成された思考ブロックをまだ含むすべてのリクエストで`"drop_block"`を送信するか（またはそれらのブロックを自分で取り除きます。差し替え後の最初の応答の`input_transformations`に、どのブロックが該当するかが正確に示されます）、同期的にコンパクションしてください。

   トランスクリプトの途中から個々のターンを切り取らないでください。切り取ると以降のすべての思考ブロックが無効になり、クライアント側のどの形式でも回避できません。行おうとしていた指示の変更には[会話途中のシステムメッセージ](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages)を、選択的な削除にはサーバー側の[コンテキスト編集](https://platform.claude.com/docs/ja/build-with-claude/context-editing)を使用してください。[コンパクションブロックを返す](https://platform.claude.com/docs/ja/build-with-claude/compaction-threshold#passing-compaction-blocks-back)を参照してください。

### 移行チェックリスト

* モデル名を`claude-fable-5`から`claude-fable-5-1`に（または`claude-mythos-5`から`claude-mythos-5-1`に）更新します。
* 強制的な`tool_choice`（`{type: "any"}`または`{type: "tool", ...}`）を置き換えます。これは400エラーを返します。`{type: "auto"}`に明示的な指示と`strict: true`のツールを組み合わせるか、JSON出力を使用してください。指示は`user`ターンに入れるか、アプリケーションが呼び出しを必要とする場合は会話途中の`role: "system"`メッセージに入れます。
* 空のものも含め、すべてのターンで`thinking`ブロックを変更せずに渡し返し続けます。Claude Fable 5.1は、Claude Opus 5、Claude Fable 5、Claude Mythos 5、およびそれ以前のモデルのブロックを読み取ります。会話をClaude Fable 5.1からClaude Mythos 5.1以外のモデルに移すと、そのブロックは削除されます。
* コードが`messages`配列を自ら構築している場合は、[以前のターンを編集している](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking)かどうかを確認します。`thinking-binding-controls-2026-08-01`ベータヘッダーと`prefix_mismatch_behavior: "drop_block"`を指定してセッションを実行し、`input_transformations`をログに記録して、すべての`prefix_binding_mismatch`を修正します。モデル切り替え後の`model_binding_mismatch`エントリは想定どおりです。
* 会話履歴を追記のみに保ちます。セッション開始時に`system`と`tools`を固定し、セッション途中の変更は`role: "system"`メッセージと`tool_addition` / `tool_removal`ブロックに移し、ターンごとのリマインダーは削除しないターンスコープのシステムメッセージとして送信し、コンテキストはサーバー側で削減するか、クライアント側の要約をまたいで引き継ぐターンから思考ブロックを取り除き、ターンをまたぐファイルは`file_id`で参照します。
* 本番環境の`prefix_mismatch_behavior`（デフォルトは`"error"`、または`"drop_block"`）を選択して監視します。他のユーザーが自分のAPIキーで実行するツールを保守している場合は、フィールドを設定してテストしてください。あなたのアカウントが適用対象でなくても、新しいアカウントはデフォルトで適用対象です。
* エージェントループでターンごとに1つのツール呼び出しになる動作がないか確認し、バッチ処理の指示を追加します。
* インターフェースでツール呼び出し間の進捗テキストを表示している場合は、`thinking.display`を`"updates"`（ベータ）または`"summarized"`に設定し、更新をプロンプトで要求します。
* リクエスト間でeffortを変更している場合は、キャッシュのヒットを維持するために、その変更を[メッセージごとのeffort](https://platform.claude.com/docs/ja/build-with-claude/effort#change-effort-mid-conversation-beta)の`role: "system"`メッセージ（ベータ）に移します。
* `stop_reason: "refusal"`を処理し、`stop_details.category`を読み取ります。`fallbacks: "default"`（ベータ）の使用を検討してください。
* `high`から始めて新たにスイープを行い`effort`を再評価し、独自のワークロードでコストとレイテンシのベースラインを取り直します。トークナイザーは変更されていません。プロンプトキャッシングのキャッシュ読み取りのコストは、Claude Fable 5の料金の4分の1です。

## Claude Opus 5からClaude Fable 5.1への移行

Claude Fable 5.1は、Claude Opus 5と同じ[Messages API](https://platform.claude.com/docs/ja/build-with-claude/working-with-messages)および[「tool use」（ツール使用）](https://platform.claude.com/docs/ja/agents-and-tools/tool-use/overview)のパターンを使用します。また、次の点もClaude Opus 5から変わりません。

* デフォルトで[100万トークンのコンテキストウィンドウ](https://platform.claude.com/docs/ja/build-with-claude/context-windows)
* [最大128kの出力トークン](https://platform.claude.com/docs/ja/models/overview)
* プロンプトキャッシングの最小トークン数（512トークン）
* [会話途中のシステムメッセージ](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages)のサポート

プリフィルの制限、サンプリングパラメータの制限、`thinking.display`のデフォルト値`"omitted"`も引き継がれます。[Claude Fable 5からClaude Fable 5.1への移行](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#migrating-from-claude-fable-5-to-claude-fable-5-1)の内容をすべて適用したうえで、以下の変更にも対応してください。

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

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

# または、検証済みの組織に同じ機能を提供する Claude Mythos 5.1 の場合:
model = "claude-mythos-5-1"  # After
```

### 変更点

1. **思考を無効にできなくなりました：** Claude Opus 5は、[effort](https://platform.claude.com/docs/ja/build-with-claude/effort)レベルが`high`以下の場合に`thinking: {type: "disabled"}`を受け付けます。`claude-fable-5-1`と`claude-mythos-5-1`では、[適応型思考](https://platform.claude.com/docs/ja/build-with-claude/thinking)は常に有効であり、`thinking: {type: "disabled"}`はどのeffortレベルでも400エラーを返します。このフィールドを削除し、より低いeffortレベルでトークン消費を制御し、思考を無効にして実行していたワークロードについては`max_tokens`を見直してください。

2. **強制的なツール選択はサポートされていません：** Claude Opus 5は`tool_choice`の`any`と`tool`を受け付けます。`claude-fable-5-1`は400エラーを返します。[破壊的変更](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-breaking-changes)を参照してください。

3. **モデル間での思考の保持：** Claude Fable 5.1はClaude Opus 5の思考ブロックを読み取ります。そのため、`claude-opus-5`から`claude-fable-5-1`に移行する会話は推論を保持します。Claude Opus 5はClaude Fable 5.1のブロックを読み取ることができません。Claude Fable 5.1のブロックは、[以前のターンが変更されると無効になります](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking)。コードがリクエスト間で以前のメッセージを編集したり、`system`や`tools`を再構築したり、クライアント上でコンパクションしたりする場合、Claude Opus 5では問題になりませんでしたが、`claude-fable-5-1`は以降のすべての思考ブロックを拒否または削除します。トラフィックを切り替える前に、そのセクションの3ステップのチェックを実行してください。[破壊的変更](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-breaking-changes)を参照してください。

4. **ツール呼び出し間のテキストは思考ブロックで返されます：** Claude Opus 5では、モデルがツール呼び出し間に書くテキストは`text`ブロックとして返されます。`claude-fable-5-1`では、Claude Fable 5と同様に、そのナレーションは各ツール呼び出しの前に1つずつ、進捗更新の`thinking`ブロックとして返されます。`thinking.display`のデフォルトである`"omitted"`では、これらには読み取り可能なテキストが含まれません。インターフェースでそのナレーションを表示する場合は、推論を非表示にしたまま進捗更新をテキストとして受け取るには`display: "updates"`（ベータ）を、両方を受け取るには`"summarized"`を設定してください。その後、`tool_use`ブロック間の空でない`thinking`ブロックを表示します。[ツール呼び出し間の進捗更新](https://platform.claude.com/docs/ja/build-with-claude/thinking#progress-updates)を参照してください。

5. **安全性分類器とフォールバックルーティング：** Claude Fable 5.1は、Claude Fable 5と同じ`stop_details`カテゴリをカバーする安全性分類器を実行します。これはClaude Opus 5の分類器よりも広い範囲です。`"bio"`などの追加の`stop_details.category`値が返されることを想定してください。完全なセットについては[拒否カテゴリの表](https://platform.claude.com/docs/ja/build-with-claude/refusals-and-fallback#refusal-response)を参照してください。`fallbacks`の設定と許可されるフォールバック先については、[拒否には`fallbacks: "default"`を使用する](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-recommended-changes)を参照してください。

6. **料金：** 入力トークン100万あたり10米ドル、出力トークン100万あたり50米ドルです。Claude Opus 5はそれぞれ5米ドルと25米ドルです。プロンプトキャッシングのキャッシュ読み取りはトークン100万あたり0.25米ドルで、Claude Opus 5の料金の半分です。[Claudeの料金](https://platform.claude.com/docs/ja/about-claude/pricing)を参照してください。

7. **データ保持：** Claude Fable 5.1とClaude Mythos 5.1は30日間のデータ保持が必要であり、Anthropicが明示的に許可しない限りゼロデータ保持（ZDR）の取り決めの下では利用できず、Covered Modelsに指定されています。Claude Opus 5はZDRの下で利用できます。[モデル固有のデータ保持要件](https://platform.claude.com/docs/ja/manage-claude/api-and-data-retention#model-specific-data-retention-requirements)を参照してください。

### 移行チェックリスト

* 組織が「zero data retention」（ゼロデータ保持）、すなわちZDRの契約を結んでいる場合は、まず利用資格を確認してください。これらのモデルは、Anthropicが明示的に許可しない限りZDRの下では利用できません。[モデル固有のデータ保持要件](https://platform.claude.com/docs/ja/manage-claude/api-and-data-retention#model-specific-data-retention-requirements)を参照してください。
* モデル名を`claude-opus-5`から`claude-fable-5-1`（または`claude-mythos-5-1`）に更新します。
* `thinking: {type: "disabled"}`の設定をすべて削除します。この設定は`claude-fable-5-1`では400エラーを返します。トークン消費は低い[effort](https://platform.claude.com/docs/ja/build-with-claude/effort)レベルで制御し、`max_tokens`を見直してください。
* 強制的な`tool_choice`（`any`または`tool`）を、`auto`と明示的な指示（`user`ターンまたは会話途中のシステムメッセージ）および`strict: true`ツールの組み合わせ、またはJSON出力に置き換えます。
* インターフェースがツール呼び出しの間のテキストを表示する場合は、`display: "updates"`（ベータ）または`"summarized"`を設定し、空でない`thinking`ブロックを表示します。
* [Claude Fable 5のチェックリスト](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#migration-checklist-fable-5-1-from-fable-5)にある、保持された思考、履歴の編集、動作、effort、フォールバックの項目を適用します。
* 自社のワークロードでコストのベースラインを再設定します。トークナイザーは変更されていません。トークンあたりの料金は異なります。

## Claude Opus 4.8以前からClaude Fable 5.1への移行

以下のチェックリストに沿って作業してください。Claude Opus 4.7以前を使用している場合は、対応する[Claude Opus 5.5移行ガイド](https://platform.claude.com/docs/ja/models/opus-5-5/migration-guide)のセクションから始めてください。

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

```python
model = "claude-opus-4-8"  # Before
model = "claude-fable-5-1"  # After

# または、検証済みの組織に同じ機能を提供する Claude Mythos 5.1 の場合:
model = "claude-mythos-5-1"  # After
```

### 移行チェックリスト

* 組織がゼロデータ保持（ZDR）の契約を結んでいる場合は、まず利用資格を確認してください。これらのモデルは、Anthropicが明示的に許可しない限りZDRの下では利用できません。Claude Opus 4.8はZDRの下で利用可能です。
* モデル名を`claude-opus-4-8`から`claude-fable-5-1`（または`claude-mythos-5-1`）に更新します。
* `thinking: {type: "disabled"}`の設定をすべて削除し、`max_tokens`を見直します。`thinking`フィールドのないリクエストは適応型思考で実行されます。
* `content[0].text`のように位置でコンテンツを読み取るレスポンス解析を更新します。レスポンスが`thinking`ブロックで始まる場合があるため、代わりに`type`でコンテンツブロックを選択してください。
* 強制的な`tool_choice`（`any`または`tool`）を、`auto`と明示的な指示（`user`ターンまたは会話途中のシステムメッセージ）および`strict: true`ツールの組み合わせ、またはJSON出力に置き換えます。
* `thinking`ブロックは変更せずにそのまま返し、そのテキストは表示専用として扱います。Claude Fable 5.1はClaude Opus 4.8のthinkingブロックを読み取れるため、`claude-fable-5-1`に移行した会話はそれまでの推論を保持します。Claude Opus 4.8はClaude Fable 5.1のブロックを読み取れません。
* コードで`messages`配列を独自に構築している場合は、[以前のターンを編集している](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking)かどうかを確認してください。Claude Opus 4.8以前向けに書かれた統合では、古いターンを切り詰めたり、以前のメッセージを削除または再構築したり、リクエストごとに`system`プロンプトを更新したりすることがよくあり、Claude Opus 4.8ではそれが問題になりませんでした。`claude-fable-5-1`では、これらのいずれを行っても、それ以降のthinkingブロックが無効になります。
* `stop_reason: "refusal"`を処理し、`stop_details.category`を読み取り、`fallbacks: "default"`（ベータ）の使用を検討します。
* [Claude Fable 5のチェックリスト](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#migration-checklist-fable-5-1-from-fable-5)にある、保持された思考、履歴の編集、動作、メッセージごとのeffort、進捗更新の項目を適用します。
* `effort`を再評価し（`high`から開始）、[キャッシングの最小トークン数](https://platform.claude.com/docs/ja/build-with-claude/prompt-caching#cache-limitations)である512トークン（Claude Opus 4.8では1,024トークン）に近いプロンプトを見直し、コストとレイテンシのベースラインを再設定します。トークンあたりの料金は異なり、思考トークンは出力トークンとして課金されるため、Claude Opus 4.8で思考なしで実行していたワークロードでは、リクエストあたりの出力トークンが増える可能性があります。

## Claude Mythos 5からClaude Mythos 5.1への移行

[Claude Mythos 5.1](https://platform.claude.com/docs/ja/models/mythos-5-1/overview)は、[Cyber Verification Program](https://support.claude.com/en/articles/14604842)などのAnthropicの検証プログラムを通じて検証された組織向けの、Claude Fable 5.1に相当するモデルです。モデルIDを切り替える前に、組織がClaude Mythos 5.1にアクセスできることを確認してください。

APIレベルの差分は[Claude Fable 5からClaude Fable 5.1への移行](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#migrating-from-claude-fable-5-to-claude-fable-5-1)と同じです。強制的なツール選択は400エラーを返し、Claude Mythos 5.1の思考ブロックを読み取れるのはClaude Mythos 5.1とClaude Fable 5.1のみです（Claude Mythos 5.1はClaude Mythos 5のブロックを読み取れますが、その逆はできません）。Claude Fable 5.1とは異なり、Claude Mythos 5.1は会話チェックを実行しないため、以前のターンを編集しても[思考ブロックが無効になる](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#fable-5-1-preserved-thinking)ことはありませんが、プロンプトキャッシングのキャッシュは再作成されます。

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

```python
model = "claude-mythos-5"  # Before
model = "claude-mythos-5-1"  # After
```

### 移行チェックリスト

* モデル名を`claude-mythos-5`から`claude-mythos-5-1`に更新します。
* 強制的な`tool_choice`（`any`または`tool`）を、`auto`と明示的な指示（`user`ターンまたは会話途中のシステムメッセージ）および`strict: true`ツールの組み合わせ、またはJSON出力に置き換えます。
* `stop_reason: "refusal"`を処理し、レスポンスのコンテンツより先に`stop_details.category`を読み取ります。[拒否とフォールバック](https://platform.claude.com/docs/ja/build-with-claude/refusals-and-fallback)を参照してください。
* 空のものも含め、すべてのターンで`thinking`ブロックを変更せずにそのまま返し続けます。
* コードで`messages`配列を独自に構築している場合は、プロンプトキャッシングのキャッシュをウォームな状態に保つため、会話履歴を追記のみにしてください。Claude Mythos 5.1は[会話チェック](https://platform.claude.com/docs/ja/build-with-claude/thinking#preserved-in-conversation)を実行しないため、編集によってthinkingブロックが無効になることはありません。
* [Claude Fable 5のセクション](https://platform.claude.com/docs/ja/models/fable-5-1/migration-guide#migrating-from-claude-fable-5-to-claude-fable-5-1)にある動作の変更と推奨される変更を適用します。ただし、Claude Mythos 5.1には該当しない履歴の編集に関する項目は除きます。
* 新たにスイープを行って`effort`を再評価し、コストとレイテンシのベースラインを再設定します。プロンプトキャッシングの読み取りコストは、Claude Mythos 5の料金の4分の1です。
