Automationscribe.com
  • Home
  • AI Scribe
  • AI Tools
  • Artificial Intelligence
  • Contact Us
No Result
View All Result
Automation Scribe
  • Home
  • AI Scribe
  • AI Tools
  • Artificial Intelligence
  • Contact Us
No Result
View All Result
Automationscribe.com
No Result
View All Result

Migrate from Anthropic’s Claude 3.5 Sonnet to Claude 4 Sonnet on Amazon Bedrock

admin by admin
September 14, 2025
in Artificial Intelligence
0
Migrate from Anthropic’s Claude 3.5 Sonnet to Claude 4 Sonnet on Amazon Bedrock
399
SHARES
2.3k
VIEWS
Share on FacebookShare on Twitter


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 functions: 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 can lead to 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 concerns, and ship confirmed finest practices to remodel this mandatory transition right into a strategic benefit that drives measurable worth on your group.

Overview of mannequin variations

Understanding the precise modifications 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 can 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 functions to course of and purpose over codebases, monetary reviews, 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 pondering and interleaved pondering. These give the mannequin devoted computational time to purpose 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 pondering between software calls, enabling extra subtle 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 couple of vital technical and strategic concerns, which we talk about within the following sections. Addressing these factors proactively can reduce danger and speed up your path to manufacturing.

Stipulations

Earlier than you can begin utilizing Anthropic’s Claude 4 Sonnet mannequin, it’s essential to allow entry to those fashions in Amazon Bedrock. For directions, see Request entry to an Amazon Bedrock basis mannequin. Ensure you overview and settle for the mannequin’s Finish Consumer License Settlement (EULA) continuing with the mannequin entry request. It’s essential to first verify that the Claude 4 Sonnet is accessible in your meant AWS Area, as a result of mannequin assist can differ relying on location. For an up to date checklist of supported Areas, consult with Mannequin assist by AWS Area in Amazon Bedrock. Moreover, you should use cross-Area inference (CRIS) by specifying an inference profile when operating mannequin inference, which may help enhance throughput and maximize useful resource availability. For a listing of supported cross-Area inference profiles, consult with Supported Areas and fashions for inference profiles.

API modifications and code updates

When migrating on Amazon Bedrock, you should use both the model-specific InvokeModel API or the unified Converse API.

For those who use the InvokeModel API, the migration is easy. You solely have to 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'

For those who use a CRIS profile for the mannequin, make 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 superb alternative to change to the Converse API. It gives a standardized request/response format for language fashions on Amazon Bedrock, making future migrations to totally different fashions or suppliers a lot less complicated. See the next code:

import boto3

bedrock_runtime = boto3.consumer(service_name="bedrock-runtime")
# Merely change the mannequin ID to change fashions
response = bedrock_runtime.converse(
    modelId='us.anthropic.claude-sonnet-4-20250514-v1:0',
    messages=[{'role': 'user', 'content': [{'text': "Your prompt here"}]}],
    inferenceConfig={'maxTokens': 1024}
)

print(response['output']['message']['content'][0]['text'])

The next are some key modifications:

  • 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_20250124 and power identify is now str_replace_based_edit_tool. The computer-use-2024-10-22 within the anthropic_beta header might be eliminated as a result of the textual content editor software is mostly obtainable in Anthropic’s Claude 4. Any code utilizing this software should be up to date to mirror these modifications. For extra particulars, see Anthropic outlined instruments.
  • Eliminated undo_edit command – The undo_edit command is now not supported in Anthropic’s Claude 4 Sonnet. Any code utilizing this command needs to be eliminated.
  • New refusal cease purpose – The mannequin now introduces a new refusal cease purpose. This purpose is returned when the mannequin declines to generate content material resulting from security insurance policies. Software logic that handles mannequin responses should be up to date to acknowledge and handle this new cease purpose to assist stop surprising conduct or errors. For instance, if you obtain a refusal cease purpose in a multi-turn interplay, it’s essential to reset the dialog context by both eradicating or updating the flip that was refused.

Immediate engineering and behavioral shifts

Don’t assume your current prompts will work completely with the brand new mannequin. Adherence to model-specific finest practices is vital.

Confer with Claude 4 immediate engineering finest practices launched by Anthropic to attain optimum outcomes. For instance, Anthropic’s Claude fashions carry out finest when prompts are structured with XML tags (for instance, , ) to obviously separate totally different elements of the enter.

Anthropic’s Claude 4 Sonnet is designed to comply with 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 pondering is a strong functionality. To unlock the deep reasoning capabilities of the brand new fashions, builders can allow prolonged pondering by together with the pondering key phrase argument of their API name. However be certain to make use of it strategically—prolonged pondering incurs extra prices as a result of reasoning tokens are billed as output tokens at commonplace mannequin charges. You’ll be charged for the complete pondering course of (not simply the abstract you see), and prices can scale with the pondering finances you set.

We advocate enabling prolonged pondering 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 pondering for easy queries or latency-sensitive functions. The characteristic provides to each value (reasoning tokens are billed) and response time. For a lot of duties, a well-crafted CoT immediate remains to be probably the most environment friendly alternative.

To make use of prolonged pondering, merely replace the Converse API name by including the additionalModelRequestFields parameter with the pondering configuration. You possibly can specify the utmost pondering tokens that the mannequin can use by setting a worth for budget_tokens. Notice that maxTokens needs to be bigger than budget_tokens for prolonged pondering. See the next code:

import boto3

bedrock_runtime = boto3.consumer(service_name="bedrock-runtime")

# Add configurations to allow prolonged pondering
response = bedrock_runtime.converse(
    modelId='us.anthropic.claude-sonnet-4-20250514-v1:0',
    messages=[{'role': 'user', 'content': [{'text': "Your prompt here"}]}],
    inferenceConfig={'maxTokens': 2048},
    additionalModelRequestFields={"pondering":{"kind": "enabled",
     "budget_tokens": 1024}}
)

reasoning_text = response['output']['message']['content'][0]['reasoningContent']['reasoningText']['text']
assistant_response = response['output']['message']['content'][1]['text']

The next desk exhibits an instance of prolonged pondering and the way it can enhance response accuracy. We immediate Anthropic’s Claude 3.5 Sonnet v2 and Claude 4 Sonnet (with pondering enabled) with an instance immediate:

Alan, Bob, Colin, Dave and Emily are standing in a circle. Alan is on Bob's instant left. Bob is on Colin's instant left. Colin is on Dave's instant left. Dave is on Emily's instant left. Who's on Alan's instant proper?

The desk exhibits responses from the 2 fashions. With prolonged pondering, the mannequin is ready to fastidiously purpose by the issue and arrive on the appropriate reply.

Mannequin Prolonged Pondering Output Appropriate Reply
Claude 3.5 Sonnet v2 N/A Let me resolve this step-by-step.
First, let’s perceive what we all know:
Alan is on Bob’s instant left
Bob is on Colin’s instant left
Colin is on Dave’s instant left
Dave is on Emily’s instant left
Beginning with any individual, let’s organize them so as:
If Dave is on Emily’s instant left, then Emily is on Dave’s instant proper
If Colin is on Dave’s instant left, then Dave is on Colin’s instant proper
If Bob is on Colin’s instant left, then Colin is on Bob’s instant proper
If Alan is on Bob’s instant left, then Bob is on Alan’s instant 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 instant proper.
The reply is Emily.
No
Claude 4 Sonnet Let me work by this step-by-step.
We have now 5 folks standing in a circle: Alan, Bob, Colin, Dave, and Emily.
Let me hint by the given data:
Alan is on Bob’s instant left
Bob is on Colin’s instant left
Colin is on Dave’s instant left
Dave is on Emily’s instant left
Since they’re in a circle, I would like to determine the order. Let me begin with one individual and work round.
If Alan is on Bob’s instant left, meaning going clockwise: Alan, then Bob.
If Bob is on Colin’s instant left, meaning going clockwise: Bob, then Colin.
If Colin is on Dave’s instant left, meaning going clockwise: Colin, then Dave.
If Dave is on Emily’s instant left, meaning 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 have now Alan → Bob → Colin → Dave → Emily, and it is a full circle of 5 folks, Emily should be adopted by Alan.
So the entire circle clockwise is: Alan → Bob → Colin → Dave → Emily → Alan
This implies Emily is on Alan’s instant left, and subsequently Alan’s instant proper can be… let me take into consideration this fastidiously.
If we go clockwise: Alan → Bob → Colin → Dave → Emily → (again to Alan)
So Alan’s instant proper (going clockwise from Alan) is Bob. And Alan’s instant left (going counter-clockwise from Alan) is Emily.
Wait, let me double-check this by verifying the given situations:
Alan is on Bob’s instant left ✓ (Alan comes proper earlier than Bob going clockwise)
Bob is on Colin’s instant left ✓ (Bob comes proper earlier than Colin going clockwise)
Colin is on Dave’s instant left ✓ (Colin comes proper earlier than Dave going clockwise)
Dave is on Emily’s instant 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 data:
Alan is on Bob’s instant left
Bob is on Colin’s instant left
Colin is on Dave’s instant left
Dave is on Emily’s instant left
Let me hint the clockwise order across the circle:
Alan → Bob (since Alan is on Bob’s instant left)
Bob → Colin (since Bob is on Colin’s instant left)
Colin → Dave (since Colin is on Dave’s instant left)
Dave → Emily (since Dave is on Emily’s instant left)
Since they’re standing in a circle, Emily should join again to finish the circle:
Emily → Alan
So the entire clockwise order is: Alan → Bob → Colin → Dave → Emily → Alan
Subsequently, Bob is on Alan’s instant proper.
Sure

With prolonged pondering enabled, the API will, by default, return a abstract of the mannequin’s full thought course of slightly than the complete chain of reasoning. It is a safeguard designed to stop misuse whereas nonetheless offering the complete intelligence advantages. Builders needs to be conscious that this can lead to a chunky or delayed sample in streaming responses and may account for this of their software’s person expertise.

Anthropic’s Claude 4 fashions characteristic the interleaved pondering functionality when utilizing prolonged pondering 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 pondering 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 pondering, consult with Prolonged pondering.

Strong analysis is non-negotiable

You will need 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 tradition benchmark is way extra priceless than reported benchmark scores.

Combine this dataset into an automatic analysis pipeline. This pipeline ought to change 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 modifications. 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 modifications 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 simply legitimate if it evaluates the brand new mannequin with the very same guardrail configuration you utilize in manufacturing, for instance, Amazon Bedrock Guardrails. A brand new mannequin’s conversational type would possibly set off current guardrails in surprising 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 reduce dangers. Contemplate shadow testing to match mannequin efficiency utilizing mirrored site visitors with out impacting customers, then conduct A/B testing to measure impression on enterprise KPIs. For the precise rollout, use both a canary launch strategy by progressively exposing a small proportion of customers to the brand new mannequin, or a blue/inexperienced deployment technique that maintains parallel environments for fast 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 mission, you possibly can de-risk the migration course of and unlock vital 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 as we speak.

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.


Concerning the authors

MelanieMelanie 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 prospects 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 facility of LLMs. Previous to becoming a member of AWS, Dr. Li held knowledge science roles within the monetary and retail industries.

DeepakDeepak 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 personalized, progressive options. Exterior the world of AI, he enjoys exploring new actions and experiences.

MahsaMahsa Paknezhad, PhD, is a Deep Studying Architect on the AWS Generative AI Innovation Heart. With a deal with scalability and manufacturing readiness, Mahsa helps organizations throughout various industries harness superior generative AI fashions to attain significant enterprise outcomes. Mahsa has a confirmed monitor file of efficiently delivering tasks particularly inside the mining business and the healthcare sector.

NicholasNicholas Moore is a Options Architect at AWS, serving to startups and companies of all sizes flip concepts into actuality. He focuses on cloud options with a deal with AI, analytics, and trendy software improvement.

DerrickDerrick Choo is a Senior Options Architect at AWS who accelerates enterprise digital transformation by cloud adoption, AI/ML, and generative AI options. He focuses on full-stack improvement and ML, designing end-to-end options spanning frontend interfaces, IoT functions, knowledge integrations, and ML fashions, with a specific deal with pc imaginative and prescient and multi-modal techniques.

SovikSovik Kumar Nath is an AI/ML and Generative AI Senior Options Architect with AWS. He has in depth expertise designing end-to-end ML and enterprise analytics options in finance, operations, advertising, 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. Exterior of labor, Sovik enjoys touring, taking ferry rides, and watching films.

SaurabhSaurabh Trikande is a Senior Product Supervisor for Amazon Bedrock and Amazon SageMaker Inference. He’s obsessed with working with prospects and companions, motivated by the objective of democratizing AI. He focuses on core challenges associated to deploying complicated AI functions, inference with multi-tenant fashions, value optimizations, and making the deployment of generative AI fashions extra accessible. In his spare time, Saurabh enjoys mountaineering, studying about progressive applied sciences, following TechCrunch, and spending time together with his household.

GarethGareth 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.

Tags: AmazonAnthropicsBedrockClaudeMigrateSonnet
Previous Post

Constructing Analysis Brokers for Tech Insights

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular News

  • How Aviva constructed a scalable, safe, and dependable MLOps platform utilizing Amazon SageMaker

    How Aviva constructed a scalable, safe, and dependable MLOps platform utilizing Amazon SageMaker

    402 shares
    Share 161 Tweet 101
  • Unlocking Japanese LLMs with AWS Trainium: Innovators Showcase from the AWS LLM Growth Assist Program

    401 shares
    Share 160 Tweet 100
  • Diffusion Mannequin from Scratch in Pytorch | by Nicholas DiSalvo | Jul, 2024

    401 shares
    Share 160 Tweet 100
  • Proton launches ‘Privacy-First’ AI Email Assistant to Compete with Google and Microsoft

    401 shares
    Share 160 Tweet 100
  • Streamlit fairly styled dataframes half 1: utilizing the pandas Styler

    401 shares
    Share 160 Tweet 100

About Us

Automation Scribe is your go-to site for easy-to-understand Artificial Intelligence (AI) articles. Discover insights on AI tools, AI Scribe, and more. Stay updated with the latest advancements in AI technology. Dive into the world of automation with simplified explanations and informative content. Visit us today!

Category

  • AI Scribe
  • AI Tools
  • Artificial Intelligence

Recent Posts

  • Migrate from Anthropic’s Claude 3.5 Sonnet to Claude 4 Sonnet on Amazon Bedrock
  • Constructing Analysis Brokers for Tech Insights
  • Unlock mannequin insights with log chance assist for Amazon Bedrock Customized Mannequin Import
  • Home
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions

© 2024 automationscribe.com. All rights reserved.

No Result
View All Result
  • Home
  • AI Scribe
  • AI Tools
  • Artificial Intelligence
  • Contact Us

© 2024 automationscribe.com. All rights reserved.