Claude Sonnet 4.6 is now available on Amazon Bedrock
This page has been translated by machine translation. View original
On February 17, 2026, Anthropic's latest model, Claude Sonnet 4.6, became available on Amazon Bedrock. This article introduces its main features, how to use it on Bedrock, and the results of testing the new "Context Compaction" feature.
https://www.aboutamazon.com/news/aws/anthropic-claude-4-opus-sonnet-amazon-bedrock?
Main Features of Claude Sonnet 4.6
- Anthropic's best computer use model: Recorded the highest score of any Sonnet to date on the OSWorld benchmark
- Significantly improved coding performance: 79.6% on SWE-bench Verified. In early testing with Claude Code, it was preferred over Sonnet 4.5 70% of the time, and over Opus 4.5 59% of the time
- 1M token context window (beta)
- Supports adaptive thinking / extended thinking
- Significantly improved resistance to prompt injection
For details on the benchmark results, see the official Anthropic announcement.
How to Use It on Amazon Bedrock
Inference Profile and Model ID
Sonnet 4.6 is used via an Inference Profile. Instead of specifying the conventional base model ID directly, you specify a profile ID for Cross-Region Inference in modelId. If your existing code uses a base model ID, you will need to replace it.
Also, starting with Sonnet 4.6, the naming convention has changed, and the date and version number have been omitted.
# 従来(Sonnet 4.5)
anthropic.claude-sonnet-4-5-20250929-v1:0
# Sonnet 4.6
anthropic.claude-sonnet-4-6
I was able to check the available profiles with the following command.
aws bedrock list-inference-profiles --region us-west-2
| Scope | Inference Profile ID | Routing Destinations |
|---|---|---|
| US | us.anthropic.claude-sonnet-4-6 |
us-east-1, us-east-2, us-west-2 |
| JP | jp.anthropic.claude-sonnet-4-6 |
ap-northeast-1, ap-northeast-3 |
| Global | global.anthropic.claude-sonnet-4-6 |
Global |
The Tokyo region was also supported from the first day of release. Since the JP profile routes to Tokyo and Osaka, it is a configuration that is easy to adopt even for projects restricted to domestic regions.
IAM Permissions
When invoking via an Inference Profile, specify the profile's ARN in the Resource of the IAM policy. Since it differs from the conventional base model ARN, you need to check your existing policies.
{
"Effect": "Allow",
"Action": "bedrock:InvokeModel",
"Resource": "arn:aws:bedrock:ap-northeast-1:*:inference-profile/jp.anthropic.claude-sonnet-4-6"
}
Python SDK Sample Code
I verified the behavior with the JP profile in the Tokyo region.
import boto3
import json
bedrock = boto3.client('bedrock-runtime', region_name='ap-northeast-1')
response = bedrock.invoke_model(
modelId='jp.anthropic.claude-sonnet-4-6',
body=json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "こんにちは!あなたのモデル名とバージョンを教えてください。"}
]
})
)
body = json.loads(response['body'].read())
print(body['content'][0]['text'])
Testing "Context Compaction" (Beta) on Bedrock
"Context Compaction" is a feature that automatically summarizes the context of a long conversation, effectively extending the usable context length. Anthropic's API documentation lists only Opus 4.6 as a supported model, but the Sonnet 4.6 announcement explicitly states that it is supported. I tested whether it actually works on Bedrock.
Test Code
I sent about 58,000 tokens of dummy text and checked whether compaction would be triggered at a threshold of 50,000 tokens.
import boto3
import json
bedrock = boto3.client('bedrock-runtime', region_name='us-west-2')
base_text = (
'Amazon Bedrock is a fully managed service that offers a choice of '
'high-performing foundation models from leading AI companies like '
'Anthropic Meta Mistral AI and Amazon through a single API. '
'It provides serverless experience so you can get started quickly '
'privately customize foundation models with your own data and easily '
'integrate and deploy them into your applications using AWS tools '
'and capabilities. '
)
messages = [
{"role": "user", "content": base_text * 800},
{"role": "assistant", "content": "I see a large amount of text about Amazon Bedrock."},
{"role": "user", "content": "Summarize our conversation."}
]
response = bedrock.invoke_model(
modelId='us.anthropic.claude-sonnet-4-6',
body=json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"anthropic_beta": ["compact-2026-01-12"],
"max_tokens": 4096,
"messages": messages,
"context_management": {
"edits": [{
"type": "compact_20260112",
"trigger": {"type": "input_tokens", "value": 50000}
}]
}
})
)
body = json.loads(response['body'].read())
for block in body['content']:
print(f"type: {block['type']}")
if block['type'] == 'compaction':
print(f"summary: {block['content'][:200]}...")
elif block['type'] == 'text':
print(f"text: {block['text'][:200]}...")
print(f"\nusage.iterations: {json.dumps(body['usage']['iterations'], indent=2)}")
Test Results
I confirmed that compaction was triggered with Sonnet 4.6. A type: compaction block was returned at the beginning of the response's content array, and a summary of the conversation was generated automatically.
Record of usage.iterations:
compaction: Input of 58,601 tokens → generated a summary of 389 tokensmessage: Generated the final response from a context of 479 tokens after summarization
58,601 tokens were compressed down to 479 tokens, and it worked as intended. Because generating the compaction summary consumes additional tokens, you need to aggregate all of usage.iterations when calculating costs.
Pricing
The price is the same as Sonnet 4.5 (input $3.00 / output $15.00 per 1M tokens), so performance is significantly improved while the price stays the same.
Cost optimization tips:
- You can adjust the balance between cost and quality with the effort setting of adaptive thinking
- Batch inference offers a 50% discount off on-demand pricing
Summary
Claude Sonnet 4.6 is available on the day of release even in the Tokyo region. Simply by replacing the model ID in your existing codebase with the Inference Profile (jp.anthropic.claude-sonnet-4-6), you can immediately benefit from the new model.
Although the price is the same as the previous model, coding performance and agent capabilities have improved dramatically, and I also confirmed that the compaction feature works. Since such a performance improvement can be expected at the same cost, if you have any systems currently using Sonnet 4.5, I recommend proactively testing and migrating them.
