Loading...
  • ビルド
  • 管理
  • モデルと料金
  • クライアントSDK
  • APIリファレンス
Search...
⌘K
Log in
適応的思考
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Solutions

  • AI agents
  • Code modernization
  • Coding
  • Customer support
  • Education
  • Financial services
  • Government
  • Life sciences

Partners

  • Amazon Bedrock
  • Google Cloud's Vertex AI

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Company

  • Anthropic
  • Careers
  • Economic Futures
  • Research
  • News
  • Responsible Scaling Policy
  • Security and compliance
  • Transparency

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Help and security

  • Availability
  • Status
  • Support
  • Discord

Terms and policies

  • Privacy policy
  • Responsible disclosure policy
  • Terms of service: Commercial
  • Terms of service: Consumer
  • Usage policy
ビルド/モデル機能

適応的思考

Claude が適応的思考モードで拡張思考をいつ、どの程度使用するかを動的に決定できるようにします。

This feature is eligible for Zero Data Retention (ZDR). When your organization has a ZDR arrangement, data sent through this feature is not stored after the API response is returned.

適応的思考は、Claude Opus 4.7、Claude Opus 4.6、Claude Sonnet 4.6 で拡張思考を使用する推奨方法であり、Claude Mythos Preview のデフォルトモードです(thinking が設定されていない場合は自動的に適用されます)。思考トークン予算を手動で設定する代わりに、適応的思考により Claude は各リクエストの複雑さに基づいて拡張思考をいつ、どの程度使用するかを動的に決定できます。Claude Opus 4.7 では、適応的思考は唯一サポートされている思考モードです。手動の thinking: {type: "enabled", budget_tokens: N} はもはや受け入れられません。

適応的思考は、特に二峰性タスクと長期的なエージェント的ワークフローなど、多くのワークロードで固定 budget_tokens を使用した拡張思考よりも優れたパフォーマンスを提供できます。ベータヘッダーは必要ありません。

ワークロードが予測可能なレイテンシーまたは思考コストの正確な制御を必要とする場合、Claude Opus 4.6 と Claude Sonnet 4.6 では budget_tokens を使用した拡張思考は依然として機能していますが、非推奨であり、もはや推奨されていません。以下の警告を参照してください。

サポートされているモデル

適応的思考は以下のモデルでサポートされています:

  • Claude Mythos Preview (claude-mythos-preview)、適応的思考がデフォルトです。thinking: {type: "disabled"} はサポートされていません
  • Claude Opus 4.7 (claude-opus-4-7)、適応的思考は唯一サポートされている思考モードです。リクエストで明示的に thinking: {type: "adaptive"} を設定しない限り、思考はオフです。手動の thinking: {type: "enabled"} は 400 エラーで拒否されます。
  • Claude Opus 4.6 (claude-opus-4-6)
  • Claude Sonnet 4.6 (claude-sonnet-4-6)

thinking.type: "enabled" と budget_tokens は Opus 4.6 と Sonnet 4.6 で非推奨であり、将来のモデルリリースで削除されます。代わりに thinking.type: "adaptive" を effort パラメータと共に使用してください。既存の budget_tokens 設定は依然として機能していますが、もはや推奨されていません。移行を計画してください。

古いモデル(Sonnet 4.5、Opus 4.5 など)は適応的思考をサポートしておらず、thinking.type: "enabled" と budget_tokens が必要です。

適応的思考の仕組み

適応モードでは、思考はモデルにとってオプションです。Claude は各リクエストの複雑さを評価し、拡張思考を使用するかどうか、どの程度使用するかを決定します。デフォルトの努力レベル(high)では、Claude はほぼ常に思考します。より低い努力レベルでは、Claude はより単純な問題については思考をスキップする可能性があります。

適応的思考はインターリーブ思考も自動的に有効にします。これは Claude がツール呼び出し間で思考できることを意味し、エージェント的ワークフローに特に効果的です。

適応的思考の使用方法

API リクエストで thinking.type を "adaptive" に設定します:

努力パラメータを使用した適応的思考

適応的思考を努力パラメータと組み合わせて、Claude がどの程度思考するかをガイドできます。努力レベルは Claude の思考配分に対するソフトガイダンスとして機能します:

努力レベル思考動作
maxClaude は思考深度に制約なく常に思考します。Claude Mythos Preview、Claude Opus 4.7、Claude Opus 4.6、Claude Sonnet 4.6 で利用可能です。
xhighClaude は深く広範な探索を伴って常に思考します。Claude Opus 4.7 で利用可能です。
high(デフォルト)Claude は常に思考します。複雑なタスクに対して深い推論を提供します。
mediumClaude は中程度の思考を使用します。非常に単純なクエリについては思考をスキップする可能性があります。
lowClaude は思考を最小化します。速度が最も重要な単純なタスクについては思考をスキップします。

適応的思考を使用したストリーミング

適応的思考はストリーミングとシームレスに機能します。思考ブロックは手動思考モードと同じように thinking_delta イベント経由でストリーミングされます:

適応的思考 vs 手動 vs 無効化思考

モード設定利用可能性使用時期
適応的thinking: {type: "adaptive"}Claude Mythos Preview(デフォルト)、Opus 4.7(唯一のモード)、Opus 4.6、Sonnet 4.6Claude が拡張思考をいつ、どの程度使用するかを決定します。effort を使用してガイドします。
手動thinking: {type: "enabled", budget_tokens: N}Claude Opus 4.7 を除くすべてのモデル(拒否されます)。Opus 4.6 と Sonnet 4.6 では非推奨(代わりに適応モードを検討してください)。思考トークン支出を正確に制御する必要がある場合。
無効化thinking パラメータを省略するか、{type: "disabled"} を渡すClaude Mythos Preview を除くすべてのモデル拡張思考が不要で、最も低いレイテンシーが必要な場合。

適応的思考は Claude Mythos Preview、Claude Opus 4.7、Opus 4.6、Sonnet 4.6 で利用可能です。Mythos Preview では、適応的思考がデフォルトであり、thinking が設定されていない場合は自動的に適用されます。Claude Opus 4.7 では、適応的思考は唯一サポートされているモードであり、budget_tokens を使用した type: "enabled" は拒否されます。古いモデルは budget_tokens を使用した type: "enabled" のみをサポートしています。Opus 4.6 と Sonnet 4.6 では、budget_tokens を使用した type: "enabled" は依然として機能していますが、非推奨です。

モード別インターリーブ思考の利用可能性:

  • 適応モード: インターリーブ思考は Claude Mythos Preview、Claude Opus 4.7、Opus 4.6、Sonnet 4.6 で自動的に有効になります。Mythos Preview と Opus 4.7 では、ツール間推論は常に思考ブロック内に存在します。
  • Sonnet 4.6 の手動モード: インターリーブ思考は interleaved-thinking-2025-05-14 ベータヘッダー経由で機能します。
  • Opus 4.6 の手動モード: インターリーブ思考は利用できません。Opus 4.6 でのエージェント的ワークフローがツール呼び出し間の思考を必要とする場合は、適応モードを使用してください。

重要な考慮事項

検証の変更

適応的思考を使用する場合、以前のアシスタント ターンは思考ブロックで開始する必要がありません。これは手動モードよりも柔軟です。手動モードでは、API は思考が有効なターンが思考ブロックで開始することを強制します。

プロンプトキャッシング

adaptive 思考を使用した連続リクエストはプロンプトキャッシュブレークポイントを保持します。ただし、adaptive と enabled/disabled 思考モード間で切り替えると、メッセージのキャッシュブレークポイントが破損します。システムプロンプトとツール定義は、モード変更に関係なくキャッシュされたままです。

思考動作の調整

適応的思考のトリガー動作はプロンプト可能です。Claude がより頻繁に、またはより少なく思考している場合は、システムプロンプトにガイダンスを追加できます:

Extended thinking adds latency and should only be used when it
will meaningfully improve answer quality — typically for problems
that require multi-step reasoning. When in doubt, respond directly.

Claude に思考を少なく行うよう指導することは、推論から利益を得るタスクの品質を低下させる可能性があります。本番環境にプロンプトベースのチューニングをデプロイする前に、特定のワークロードへの影響を測定してください。最初に低い努力レベルでテストすることを検討してください。

コスト管理

max_tokens を総出力(思考 + レスポンステキスト)のハード制限として使用します。effort パラメータは、Claude が割り当てる思考量に対する追加のソフトガイダンスを提供します。これらを組み合わせることで、コストを効果的に制御できます。

high と max 努力レベルでは、Claude はより広範に思考する可能性があり、max_tokens 予算を使い果たす可能性が高くなります。レスポンスで stop_reason: "max_tokens" が表示される場合は、モデルにより多くのスペースを与えるために max_tokens を増やすか、努力レベルを下げることを検討してください。

思考ブロックの操作

以下の概念は、適応モードと手動モードのどちらを使用するかに関係なく、拡張思考をサポートするすべてのモデルに適用されます。

要約された思考

With extended thinking enabled, the Messages API for Claude 4 models returns a summary of Claude's full thinking process. Summarized thinking provides the full intelligence benefits of extended thinking, while preventing misuse. This is the default behavior on Claude 4 models when the display field on the thinking configuration is unset or set to "summarized". On Claude Opus 4.7 and Claude Mythos Preview, display defaults to "omitted" instead, so you must set display: "summarized" explicitly to receive summarized thinking.

Here are some important considerations for summarized thinking:

  • You're charged for the full thinking tokens generated by the original request, not the summary tokens.
  • The billed output token count will not match the count of tokens you see in the response.
  • On Claude 4 models, the first few lines of thinking output are more verbose, providing detailed reasoning that's particularly helpful for prompt engineering purposes. Claude Mythos Preview summarizes from the first token, so its thinking blocks do not show this verbose preamble.
  • As Anthropic seeks to improve the extended thinking feature, summarization behavior is subject to change.
  • Summarization preserves the key ideas of Claude's thinking process with minimal added latency, enabling a streamable user experience.
  • Summarization is processed by a different model than the one you target in your requests. The thinking model does not see the summarized output.

In rare cases where you need access to full thinking output for Claude 4 models, contact our sales team.

思考表示の制御

The display field on the thinking configuration controls how thinking content is returned in API responses. It accepts two values:

  • "summarized": Thinking blocks contain summarized thinking text. See Summarized thinking for details. This is the default on Claude Opus 4.6, Claude Sonnet 4.6, and earlier Claude 4 models.
  • "omitted": Thinking blocks are returned with an empty thinking field. The signature field still carries the encrypted full thinking for multi-turn continuity (see Thinking encryption). This is the default on Claude Opus 4.7 and Claude Mythos Preview.

Setting display: "omitted" is useful when your application doesn't surface thinking content to users. The primary benefit is faster time-to-first-text-token when streaming: The server skips streaming thinking tokens entirely and delivers only the signature, so the final text response begins streaming sooner.

Here are some important considerations for omitted thinking:

  • You're still charged for the full thinking tokens. Omitting reduces latency, not cost.
  • If you pass thinking blocks back in multi-turn conversations, pass them unchanged. The server decrypts the signature to reconstruct the original thinking for prompt construction (see Preserving thinking blocks). Any text you place in the thinking field of a round-tripped omitted block is ignored.
  • display is invalid with thinking.type: "disabled" (there is nothing to display).
  • When using thinking.type: "adaptive" and the model skips thinking for a simple request, no thinking block is produced regardless of display.

The signature field is identical whether display is "summarized" or "omitted". Switching display values between turns in a conversation is supported.

Claude Opus 4.7 では、thinking.display はデフォルトで "omitted" です。思考ブロックは依然としてレスポンスストリームに表示されますが、明示的にオプトインしない限り、それらの thinking フィールドは空です。これは Claude Opus 4.6 のデフォルトが "summarized" だった場合からのサイレント変更です。Claude Opus 4.7 で要約された思考テキストを復元するには、thinking.display を明示的に "summarized" に設定します:

thinking = {
    "type": "adaptive",
    "display": "summarized",
}

display: "omitted" を使用したコード例とストリーミング動作については、拡張思考ページの思考表示の制御を参照してください。そこの例は type: "enabled" を使用しています。適応的思考では、以下を使用します:

thinking = {"type": "adaptive", "display": "omitted"}

思考暗号化

Full thinking content is encrypted and returned in the signature field. This field is used to verify that thinking blocks were generated by Claude when passed back to the API.

It is only strictly necessary to send back thinking blocks when using tools with extended thinking. Otherwise you can omit thinking blocks from previous turns. If you pass them back, whether the API keeps or strips them depends on the model: Opus 4.5+ and Sonnet 4.6+ keep them in context by default; earlier Opus/Sonnet models and all Haiku models strip them. See context editing to configure this.

If sending back thinking blocks, we recommend passing everything back as you received it for consistency and to avoid potential issues.

Here are some important considerations on thinking encryption:

  • When streaming responses, the signature is added via a signature_delta inside a content_block_delta event just before the content_block_stop event.
  • signature values are significantly longer in Claude 4 models than in previous models.
  • The signature field is an opaque field and should not be interpreted or parsed.
  • signature values are compatible across platforms (Claude APIs, Amazon Bedrock, and Vertex AI). Values generated on one platform will be compatible with another.

価格設定

For complete pricing information including base rates, cache writes, cache hits, and output tokens, see the pricing page.

The thinking process incurs charges for:

  • Tokens used during thinking (output tokens)
  • Thinking blocks from prior assistant turns kept in context: only the last turn on earlier Opus/Sonnet models and all Haiku models; all turns by default on Opus 4.5+ and Sonnet 4.6+ (input tokens)
  • Standard text output tokens

When extended thinking is enabled, a specialized system prompt is automatically included to support this feature.

When using summarized thinking:

  • Input tokens: Tokens in your original request (excludes thinking tokens from previous turns)
  • Output tokens (billed): The original thinking tokens that Claude generated internally
  • Output tokens (visible): The summarized thinking tokens you see in the response
  • No charge: Tokens used to generate the summary

When using display: "omitted":

  • Input tokens: Tokens in your original request (same as summarized)
  • Output tokens (billed): The original thinking tokens that Claude generated internally (same as summarized)
  • Output tokens (visible): Zero thinking tokens (the thinking field is empty)

The billed output token count will not match the visible token count in the response. You are billed for the full thinking process, not the thinking content visible in the response.

追加トピック

拡張思考ページは、モード固有のコード例を含む複数のトピックについてより詳しく説明しています:

  • 思考を使用したツール使用: 適応的思考に対しても同じルールが適用されます。ツール呼び出し間で思考ブロックを保持し、思考がアクティブな場合の tool_choice 制限に注意してください。
  • プロンプトキャッシング: 適応的思考では、同じ思考モードを使用した連続リクエストはキャッシュブレークポイントを保持します。adaptive と enabled/disabled モード間で切り替えると、メッセージのキャッシュブレークポイントが破損します(システムプロンプトとツール定義は引き続きキャッシュされます)。
  • コンテキストウィンドウ: 思考トークンが max_tokens とコンテキストウィンドウ制限とどのように相互作用するか。

次のステップ

拡張思考

Was this page helpful?

  • 適応的思考 vs 手動 vs 無効化思考
client = anthropic.Anthropic()

response = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=16000,
    thinking={"type": "adaptive"},
    messages=[
        {
            "role": "user",
            "content": "Explain why the sum of two even numbers is always even.",
        }
    ],
)

for block in response.content:
    if block.type == "thinking":
        print(f"\nThinking: {block.thinking}")
    elif block.type == "text":
        print(f"\nResponse: {block.text}")
client = anthropic.Anthropic()

response = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=16000,
    thinking={"type": "adaptive"},
    output_config={"effort": "medium"},
    messages=[{"role": "user", "content": "What is the capital of France?"}],
)

print(response.content[0].text)
client = anthropic.Anthropic()

with client.messages.stream(
    model="claude-opus-4-7",
    max_tokens=16000,
    thinking={"type": "adaptive"},
    messages=[
        {
            "role": "user",
            "content": "What is the greatest common divisor of 1071 and 462?",
        }
    ],
) as stream:
    for event in stream:
        if event.type == "content_block_start":
            print(f"\nStarting {event.content_block.type} block...")
        elif event.type == "content_block_delta":
            if event.delta.type == "thinking_delta":
                print(event.delta.thinking, end="", flush=True)
            elif event.delta.type == "text_delta":
                print(event.delta.text, end="", flush=True)

手動モード、ツール使用、プロンプトキャッシングを含む拡張思考について詳しく学びます。

努力パラメータ

努力パラメータを使用して Claude がどの程度徹底的に応答するかを制御します。