This put up is co-written with Gareth Jones from Anthropic.
Anthropic’s Claude 4 Sonnet mannequin has launched on Amazon Bedrock, marking a major development in basis mannequin capabilities. Consequently, the deprecation timeline for Anthropic’s Claude 3.5 Sonnet (v1 and v2) was introduced. This evolution creates a twin crucial for manufacturing AI purposes: the chance to harness enhanced efficiency and the operational necessity emigrate earlier than deprecation. Organizations should deal with mannequin migrations as a core part of their AI inference technique, as a result of poor execution may end up in service disruptions, efficiency regressions, and price overruns.
This put up gives a scientific strategy to migrating from Anthropic’s Claude 3.5 Sonnet to Claude 4 Sonnet on Amazon Bedrock. We look at the important thing mannequin variations, spotlight important migration issues, and ship confirmed greatest practices to rework this needed transition right into a strategic benefit that drives measurable worth on your group.
Overview of mannequin variations
Understanding the precise adjustments between mannequin variations is step one in planning a profitable migration. The migration from Anthropic’s Claude Sonnet 3.5 Sonnet to Claude 4 Sonnet introduces functionality and behavioral shifts which you could make the most of:
- Elevated context window – Anthropic’s Claude 4 Sonnet expands the context window from 200,000 tokens to 1 million tokens (beta). This enables purposes to course of and cause over codebases, monetary stories, or prolonged authorized paperwork in a single immediate, simplifying complicated workflows.
- Native reasoning mechanisms – Whereas Anthropic’s Claude 3.5 Sonnet fashions depend on the chain-of-thought (CoT) prompting approach, Claude 4 fashions introduce built-in, API-enabled reasoning options like prolonged considering and interleaved considering. These give the mannequin devoted computational time to cause earlier than answering, dramatically enhancing efficiency on complicated issues.
- Superior software use – Anthropic’s Claude 4 Sonnet mannequin considerably upgrades software use capabilities. They will execute a number of instruments in parallel and use prolonged considering between software calls, enabling extra refined and environment friendly agentic workflows in comparison with the sequential software use of older fashions.
To seek out out extra concerning the mannequin variations, consult with the Full Mannequin Comparability Information.
A profitable migration hinges on a number of vital technical and strategic issues, which we talk about within the following sections. Addressing these factors proactively can decrease danger and speed up your path to manufacturing.
Conditions
Earlier than you can begin utilizing Anthropic’s Claude 4 Sonnet mannequin, you will need to allow entry to those fashions in Amazon Bedrock. For directions, see Request entry to an Amazon Bedrock basis mannequin. Be sure you evaluation and settle for the mannequin’s Finish Person License Settlement (EULA) continuing with the mannequin entry request. It’s essential to first verify that the Claude 4 Sonnet is out there in your supposed AWS Area, as a result of mannequin help can differ relying on location. For an up to date checklist of supported Areas, consult with Mannequin help by AWS Area in Amazon Bedrock. Moreover, you should utilize cross-Area inference (CRIS) by specifying an inference profile when working mannequin inference, which can assist enhance throughput and maximize useful resource availability. For an inventory of supported cross-Area inference profiles, consult with Supported Areas and fashions for inference profiles.
API adjustments and code updates
When migrating on Amazon Bedrock, you should utilize both the model-specific InvokeModel API or the unified Converse API.
When you use the InvokeModel API, the migration is simple. You solely must replace the modelId in your code, as a result of the request physique construction for Anthropic’s Messages API stays constant between variations:
- Previous mannequin ID –
'anthropic.claude-3-5-sonnet-20240620-v1:0'or'anthropic.claude-3-5-sonnet-20241022-v2:0' - New mannequin ID –
'anthropic.claude-4-sonnet-20240514-v1:0'
When you use a CRIS profile for the mannequin, be sure you specify the appropriate inference profile ID in one of many supply Areas, for instance, 'us.anthropic.claude-sonnet-4-20250514-v1:0'.
This migration is a wonderful alternative to change to the Converse API. It gives a standardized request/response format for language fashions on Amazon Bedrock, making future migrations to completely different fashions or suppliers a lot easier. See the next code:
The next are some key adjustments:
- Up to date textual content editor software – Builders utilizing Anthropic’s built-in textual content editor software for agentic workflows should be conscious that the software definition has been up to date. The software kind is now
text_editor_20250124and power identify is nowstr_replace_based_edit_tool. Thecomputer-use-2024-10-22within theanthropic_betaheader could be eliminated as a result of the textual content editor software is usually out there in Anthropic’s Claude 4. Any code utilizing this software should be up to date to mirror these adjustments. For extra particulars, see Anthropic outlined instruments. - Eliminated
undo_editcommand – Theundo_editcommand is not supported in Anthropic’s Claude 4 Sonnet. Any code utilizing this command ought to be eliminated. - New
refusalcease cause – The mannequin now introduces a new refusal cease cause. This cause is returned when the mannequin declines to generate content material because of security insurance policies. Software logic that handles mannequin responses should be up to date to acknowledge and handle this new cease cause to assist forestall sudden conduct or errors. For instance, while you obtain arefusalcease cause in a multi-turn interplay, you will need to reset the dialog context by both eradicating or updating the flip that was refused.
Immediate engineering and behavioral shifts
Don’t assume your present prompts will work completely with the brand new mannequin. Adherence to model-specific greatest practices is essential.
Discuss with Claude 4 immediate engineering greatest practices launched by Anthropic to attain optimum outcomes. For instance, Anthropic’s Claude fashions carry out greatest when prompts are structured with XML tags (for instance, , ) to obviously separate completely different elements of the enter.
Anthropic’s Claude 4 Sonnet is designed to observe directions extra exactly. It is a main benefit, however would possibly imply it’s much less verbose or elaborative than Claude 3.5 Sonnet until explicitly prompted to be. Your system prompts defining the AI’s persona would possibly want changes.
New reasoning options
Anthropic’s Claude 4 Sonnet mannequin’s built-in prolonged considering is a strong functionality. To unlock the deep reasoning capabilities of the brand new fashions, builders can allow prolonged considering by together with the considering key phrase argument of their API name. However ensure that to make use of it strategically—prolonged considering incurs further prices as a result of reasoning tokens are billed as output tokens at commonplace mannequin charges. You can be charged for the complete considering course of (not simply the abstract you see), and prices can scale with the considering funds you set.
We advocate enabling prolonged considering for duties requiring deep, multi-step evaluation the place accuracy is paramount (for instance, complicated scientific issues or superior coding challenges).
We advocate disabling prolonged considering for easy queries or latency-sensitive purposes. The function provides to each price (reasoning tokens are billed) and response time. For a lot of duties, a well-crafted CoT immediate continues to be probably the most environment friendly selection.
To make use of prolonged considering, merely replace the Converse API name by including the additionalModelRequestFields parameter with the considering configuration. You may specify the utmost considering tokens that the mannequin can use by setting a price for budget_tokens. Word that maxTokens ought to be bigger than budget_tokens for prolonged considering. See the next code:
The next desk reveals an instance of prolonged considering and the way it can enhance response accuracy. We immediate Anthropic’s Claude 3.5 Sonnet v2 and Claude 4 Sonnet (with considering enabled) with an instance immediate:
The desk reveals responses from the 2 fashions. With prolonged considering, the mannequin is ready to rigorously cause by means of the issue and arrive on the appropriate reply.
| Mannequin | Prolonged Considering | Output | Appropriate Reply |
| Claude 3.5 Sonnet v2 | N/A | Let me remedy this step-by-step. First, let’s perceive what we all know: Alan is on Bob’s quick left Bob is on Colin’s quick left Colin is on Dave’s quick left Dave is on Emily’s quick left Beginning with any particular person, let’s prepare them so as: If Dave is on Emily’s quick left, then Emily is on Dave’s quick proper If Colin is on Dave’s quick left, then Dave is on Colin’s quick proper If Bob is on Colin’s quick left, then Colin is on Bob’s quick proper If Alan is on Bob’s quick left, then Bob is on Alan’s quick proper So the order going clockwise is: Alan → Bob → Colin → Dave → Emily Since they’re in a circle, Emily should be subsequent to Alan to finish the circle. Subsequently, Emily is on Alan’s quick proper. The reply is Emily. |
No |
| Claude 4 Sonnet | Let me work by means of this step-by-step. Now we have 5 folks standing in a circle: Alan, Bob, Colin, Dave, and Emily. Let me hint by means of the given info: Alan is on Bob’s quick left Bob is on Colin’s quick left Colin is on Dave’s quick left Dave is on Emily’s quick left Since they’re in a circle, I want to determine the order. Let me begin with one particular person and work round. If Alan is on Bob’s quick left, which means going clockwise: Alan, then Bob. If Bob is on Colin’s quick left, which means going clockwise: Bob, then Colin. If Colin is on Dave’s quick left, which means going clockwise: Colin, then Dave. If Dave is on Emily’s quick left, which means going clockwise: Dave, then Emily. So going clockwise across the circle: Alan → Bob → Colin → Dave → Emily However wait, because it’s a circle, Emily should join again to somebody. Since we’ve got Alan → Bob → Colin → Dave → Emily, and it is a full circle of 5 folks, Emily should be adopted by Alan. So the whole circle clockwise is: Alan → Bob → Colin → Dave → Emily → Alan This implies Emily is on Alan’s quick left, and due to this fact Alan’s quick proper can be… let me take into consideration this rigorously. If we go clockwise: Alan → Bob → Colin → Dave → Emily → (again to Alan) So Alan’s quick proper (going clockwise from Alan) is Bob. And Alan’s quick left (going counter-clockwise from Alan) is Emily. Wait, let me double-check this by verifying the given circumstances: Alan is on Bob’s quick left ✓ (Alan comes proper earlier than Bob going clockwise) Bob is on Colin’s quick left ✓ (Bob comes proper earlier than Colin going clockwise) Colin is on Dave’s quick left ✓ (Colin comes proper earlier than Dave going clockwise) Dave is on Emily’s quick left ✓ (Dave comes proper earlier than Emily going clockwise) I verify Bob sits on to Alan’s proper within the round association. |
this step-by-step: Given info: Alan is on Bob’s quick left Bob is on Colin’s quick left Colin is on Dave’s quick left Dave is on Emily’s quick left Let me hint the clockwise order across the circle: Alan → Bob (since Alan is on Bob’s quick left) Bob → Colin (since Bob is on Colin’s quick left) Colin → Dave (since Colin is on Dave’s quick left) Dave → Emily (since Dave is on Emily’s quick left) Since they’re standing in a circle, Emily should join again to finish the circle: Emily → Alan So the whole clockwise order is: Alan → Bob → Colin → Dave → Emily → Alan Subsequently, Bob is on Alan’s quick proper. |
Sure |
With prolonged considering enabled, the API will, by default, return a abstract of the mannequin’s full thought course of slightly than all the chain of reasoning. It is a safeguard designed to stop misuse whereas nonetheless offering the complete intelligence advantages. Builders ought to be conscious that this may end up in a chunky or delayed sample in streaming responses and may account for this of their software’s consumer expertise.
Anthropic’s Claude 4 fashions function the interleaved considering functionality when utilizing prolonged considering with instruments, permitting the mannequin to carry out intermediate reasoning between software calls and develop extra nuanced analytical conclusions primarily based on the software outcomes obtained. To allow interleaved considering for software calling, add the extra parameter "anthropic_beta": ["interleaved-thinking-2025-05-14"] to additionalModelRequestFields within the Converse API request.
For extra particulars on utilizing prolonged considering, consult with Prolonged considering.
Strong analysis is non-negotiable
You have to confirm that the brand new mannequin performs in addition to or higher than the outdated one in your particular duties. Create a curated set of prompts and anticipated outputs which can be extremely consultant of your manufacturing site visitors. This practice benchmark is way extra useful than reported benchmark scores.
Combine this dataset into an automatic analysis pipeline. This pipeline ought to turn into a part of your steady integration and steady supply (CI/CD) course of, serving as a everlasting regression suite for future mannequin or immediate adjustments. For tooling, groups can use built-in options like Amazon Bedrock evaluations or open supply analysis frameworks like RAGAS and DeepEval.
Managing built-in security and governance
A mannequin’s security profile adjustments with every model. This should be examined as a part of an built-in system. By no means take a look at the brand new mannequin in isolation. Your migration take a look at plan is barely legitimate if it evaluates the brand new mannequin with the very same guardrail configuration you employ in manufacturing, for instance, Amazon Bedrock Guardrails. A brand new mannequin’s conversational type would possibly set off present guardrails in sudden methods, resulting in a spike in blocked responses.
Implementing protected deployment methods
When deploying Anthropic’s Claude 4 Sonnet to manufacturing, implement a phased rollout technique to attenuate dangers. Take into account shadow testing to check mannequin efficiency utilizing mirrored site visitors with out impacting customers, then conduct A/B testing to measure affect on enterprise KPIs. For the precise rollout, use both a canary launch strategy by regularly exposing a small proportion of customers to the brand new mannequin, or a blue/inexperienced deployment technique that maintains parallel environments for immediate rollback functionality. This structured strategy facilitates protected validation of the brand new mannequin’s efficiency whereas sustaining enterprise continuity.
Conclusion
By treating the transition from Anthropic’s Claude 3.5 Sonnet (v1 and v2) to Claude 4 Sonnet as a structured engineering challenge, you’ll be able to de-risk the migration course of and unlock important advantages. Understanding the important thing mannequin variations, adapting your prompts and API calls, and implementing a strong, automated analysis technique are the pillars of a profitable improve.
This transition is a chance to take care of enterprise continuity and improve your software with next-generation capabilities. We encourage you to start your evaluation and testing at this time.
For extra particulars, consult with Migrating to Claude 4 and Anthropic’s Claude in Amazon Bedrock, and attain out to us for migration-specific inquiries.
In regards to the authors
Melanie Li, PhD, is a Senior Generative AI Specialist Options Architect at AWS primarily based in Sydney, Australia, the place her focus is on working with clients to construct options utilizing state-of-the-art AI/ML instruments. She has been actively concerned in a number of generative AI initiatives throughout APJ, harnessing the ability of LLMs. Previous to becoming a member of AWS, Dr. Li held information science roles within the monetary and retail industries.
Deepak Dalakoti, PhD, is a Deep Studying Architect on the Generative AI Innovation Centre in Sydney, Australia. With experience in AI, he companions with shoppers to speed up their generative AI adoption by means of custom-made, revolutionary options. Outdoors the world of AI, he enjoys exploring new actions and experiences.
Mahsa Paknezhad, PhD, is a Deep Studying Architect on the AWS Generative AI Innovation Middle. With a give attention to scalability and manufacturing readiness, Mahsa helps organizations throughout numerous industries harness superior generative AI fashions to attain significant enterprise outcomes. Mahsa has a confirmed observe file of efficiently delivering tasks particularly inside the mining business and the healthcare sector.
Nicholas Moore is a Options Architect at AWS, serving to startups and companies of all sizes flip concepts into actuality. He makes a speciality of cloud options with a give attention to AI, analytics, and trendy software improvement.
Derrick Choo is a Senior Options Architect at AWS who accelerates enterprise digital transformation by means of cloud adoption, AI/ML, and generative AI options. He makes a speciality of full-stack improvement and ML, designing end-to-end options spanning frontend interfaces, IoT purposes, information integrations, and ML fashions, with a selected give attention to pc imaginative and prescient and multi-modal methods.
Sovik Kumar Nath is an AI/ML and Generative AI Senior Options Architect with AWS. He has intensive expertise designing end-to-end ML and enterprise analytics options in finance, operations, advertising and marketing, healthcare, provide chain administration, and IoT. He has grasp’s levels from the College of South Florida and College of Fribourg, Switzerland, and a bachelor’s diploma from the Indian Institute of Know-how, Kharagpur. Outdoors of labor, Sovik enjoys touring, taking ferry rides, and watching films.
Saurabh Trikande is a Senior Product Supervisor for Amazon Bedrock and Amazon SageMaker Inference. He’s captivated with working with clients and companions, motivated by the objective of democratizing AI. He focuses on core challenges associated to deploying complicated AI purposes, inference with multi-tenant fashions, price optimizations, and making the deployment of generative AI fashions extra accessible. In his spare time, Saurabh enjoys mountain climbing, studying about revolutionary applied sciences, following TechCrunch, and spending time along with his household.
Gareth Jones is a Product Supervisor at Anthropic targeted on the Claude API. His work contains collaboration with AWS on Amazon Bedrock to make Claude broadly accessible to builders.

