Technical research with cited sources. Original measurements are identified in the article.

Published: June 30, 2026 Updated: August 16, 2026

About the author

Claude Sonnet 5 is Anthropic’s new Sonnet-class model for coding, agents, tool use and professional knowledge work. The official Anthropic API model ID is claude-sonnet-5. The string anthropic/claude-sonnet-5 is not the native Anthropic model ID; it is a router-style provider ID commonly used by multi-model platforms like OpenRouter. For Mac users, Sonnet 5 is a cloud/API model: it does not run locally in Ollama, LM Studio or MLX, but it can be used on macOS through Claude Code, the Claude API and hybrid local-plus-cloud workflows.

Anthropic introduced Claude Sonnet 5 on June 30, 2026. The company describes it as the most agentic Sonnet model so far, able to plan, use tools such as browsers and terminals, and run autonomously at a level that previously required larger and more expensive models. (1)

What is Claude Sonnet 5?

Claude Sonnet 5 is the next generation of Anthropic’s Sonnet family. Historically, Sonnet has been the middle tier between the cheaper Haiku models and the more expensive Opus or Fable models: capable enough for serious work, but cheaper and faster than the top tier.

Sonnet 5 pushes that role further into agentic work. It is not just a chat model for short answers. It is designed for workflows where the model has to keep working across several steps: read code, use tools, inspect errors, run checks, revise its own output and continue toward a goal.

Claude Sonnet 5 is not a local Mac model. It is a cloud/API model that you use from your Mac.

Your Mac is the client. The model inference does not happen on your M1, M2, M3 or M4 chip.

Official model ID vs router naming

The naming matters because developers often mix up Anthropic IDs and router IDs.

NameMeaning
claude-sonnet-5official Anthropic API model ID
anthropic/claude-sonnet-5router/provider-style ID, for example on multi-model platforms
anthropic.claude-sonnet-5Bedrock-style provider format
claude-sonnet-5 on Google CloudGoogle Cloud model ID according to Anthropic’s model overview2

Anthropic’s documentation lists claude-sonnet-5 as the model ID and describes it as the best combination of speed and intelligence. It supports a 1M token context window by default, up to 128K output tokens and adaptive thinking. (3)

If you call Anthropic directly, use:

model="claude-sonnet-5"

If you use a router, the model string may look like this:

anthropic/claude-sonnet-5

That is the router’s naming convention, not the native Anthropic API ID.

Key facts for Claude Sonnet 5

PropertyClaude Sonnet 5
ProviderAnthropic
Official API IDclaude-sonnet-5
Launch dateJune 30, 2026
Model familySonnet
Main focusCoding, agents, tool use, knowledge work
InputText and image
OutputText
Context window1M tokens
Max output128K tokens
ThinkingAdaptive thinking
Default efforthigh by default; low/medium/high/xhigh/max can be set explicitly (4)
Local Mac inferenceNo
Ollama / LM Studio / MLXNo
Claude CodeYes
Claude APIYes
AWS / Google Cloud / Microsoft FoundryYes, depending on platform
Zero Data RetentionSupported for organizations with ZDR agreements
Priority TierNot available on Sonnet 5 according to Anthropic docs

Anthropic describes Sonnet 5 as a drop-in upgrade for Sonnet 4.6, but there are important behavior changes. Adaptive thinking is on by default; manual extended thinking (thinking.type: "enabled") returns 400, as do non-default temperature, top_p and top_k values. The new tokenizer can produce approximately 30 percent more tokens for the same text. (34)

What Claude Sonnet 5 enables in Mac workflows

Apple Silicon does not accelerate Claude Sonnet 5 directly. The model does not run on your Mac. It can still be used in Mac workflows because many modern AI workflows on macOS are client workflows:

  • Claude Code in the terminal
  • repository analysis
  • local files plus cloud agents
  • browser and tool workflows
  • documentation writing
  • debugging logs
  • refactoring plans
  • UI and frontend prototyping
  • test generation
  • long technical documents

The Mac is the working environment. Claude Sonnet 5 is the cloud intelligence layer.

Sonnet 5 is not a local model for Mac; it is a cloud model used in Mac workflows.

Does Claude Sonnet 5 run locally in Ollama?

No.

Claude Sonnet 5 is not an open-weight model. There are no official weights to download, no local Ollama tag, no MLX port and no LM Studio file. When you use Sonnet 5, you use Anthropic or another platform provider.

That separates it clearly from local models such as Gemma, Qwen, Llama, Mistral or smaller vision models. Local models run on your Mac with quantization. Claude Sonnet 5 runs as a cloud model.

QuestionAnswer
Can I run ollama run claude-sonnet-5?No
Is there a GGUF build?No
Is there an MLX version?No
Does it work offline?No
Can I use it from a Mac?Yes, through Claude, Claude Code, the API or routers
Is it ideal for sensitive local files?Only after privacy and compliance review

Pricing

Anthropic currently lists $2 per 1M input tokens and $10 per 1M output tokens for Claude Sonnet 5. The introductory price that was originally scheduled through August 31, 2026 is now the standard price; the planned increase to $3 and $15 from September 1 will not occur. (5)

Price statusInputOutput
current$2 / 1M tokens$10 / 1M tokens

Prompt caching also matters. Anthropic lists Sonnet 5 cache-write and cache-read rates separately: 5-minute cache writes cost $2.50 per 1M tokens, 1-hour cache writes cost $4 per 1M tokens and cache hits cost $0.20 per 1M tokens. These cache rates apply alongside the current $2/$10 token price. (5)

The Batch API gives a 50 percent discount. Anthropic currently lists $1 per 1M input tokens and $5 per 1M output tokens for Sonnet 5. (5)

Simple cost example

Imagine a request with 100,000 input tokens and 5,000 output tokens.

At the current price:

PartCalculationCost
Input0.1 × $2$0.20
Output0.005 × $10$0.05
Total$0.25

That single large request remains relatively inexpensive in this example, but agents are different. Claude Code, browser agents and tool workflows can create many steps, tool calls and intermediate outputs. The real cost is the whole run, not just one prompt.

1M context: powerful, but not something to waste

Claude Sonnet 5 supports a 1M token context window by default. Anthropic says 1M tokens is both the default and maximum; there is no smaller context variant. (3)

This is useful for:

  • large repositories
  • long documentation
  • many log files
  • detailed specifications
  • multi-step agent runs
  • large Markdown or MDX projects
  • bilingual article pairs
  • codebase-wide refactors

But a 1M context window does not mean you should always use 1M tokens. More context means:

  • higher cost
  • more latency
  • more irrelevant information
  • higher chance of unclear task framing
  • larger output and thinking budgets

The better workflow is to select only the files and context that matter for the current task.

New tokenizer: why costs may feel different

Claude Sonnet 5 uses a new tokenizer. Anthropic says the same input text can produce approximately 30 percent more tokens than on Claude Sonnet 4.6. The API shape is unchanged, but token counts, cost estimates, natural-language capacity inside the context window and max_tokens budgets can change. (3)

If you are migrating from Sonnet 4.6, you should:

  1. Recount prompts.
  2. Revisit max_tokens.
  3. Check real costs from logs.
  4. Use prompt caching for recurring project context.
  5. Avoid blindly reusing old token budgets.

At launch, Anthropic said the pricing was intended to make the transition roughly cost-neutral because the new tokenizer can produce more tokens for the same input. (1)

Adaptive thinking: what changed

Claude Sonnet 5 uses adaptive thinking. On Sonnet 4.6, requests without a thinking field ran without thinking. On Sonnet 5, those same requests run with adaptive thinking by default. (3)

That means:

  • The model dynamically decides how much reasoning effort the task needs.
  • max_tokens is a hard limit for the total output, including thinking plus final response.
  • Long agent workflows need more careful output budgeting.
  • The effort parameter matters when cost and latency matter.

Anthropic recommends reviewing token budgets, extended thinking configuration and sampling parameters when migrating to Sonnet 5. (3)

Sampling parameters: do not just set temperature

A major API detail: Claude Sonnet 5 rejects non-default values for temperature, top_p and top_k. If you set those parameters to non-default values, the API returns a 400 error. Anthropic recommends using system prompt instructions instead to control style, length and behavior. (3)

Old examples like this may break:

temperature=0.2
top_p=0.9

Use instructions instead:

Write concisely, deterministically and without creative embellishment.

Example: using Sonnet 5 with the Anthropic API

import anthropic

client = anthropic.Anthropic()

message = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=4000,
    messages=[
        {
            "role": "user",
            "content": "Explain in five sections when Claude Sonnet 5 is more useful for Mac workflows than a local Ollama model."
        }
    ],
)

print(message.content[0].text)

When migrating from Sonnet 4.6, changing the model name is not always enough. Remove old sampling parameters, check thinking settings and recount long prompts.

Example: router-style naming

On a router, the model ID may look like this:

anthropic/claude-sonnet-5

That is useful if you want to access multiple providers through one OpenAI-compatible API. It does not change the core fact: the native Anthropic model ID is claude-sonnet-5.

Routers may have their own pricing, limits, headers, fallback behavior and data handling rules. For sensitive data, check the model and the provider path together.

Sonnet 5 vs Sonnet 4.6

Anthropic reports improvements over Sonnet 4.6 in coding, agentic tasks, tool use, reasoning and knowledge work. (1)

PointSonnet 4.6Sonnet 5
Context1M1M
Max output128K128K
Thinkingnot automatic when no thinking field is providedadaptive thinking by default
Samplingolder workflows may use parametersnon-default sampling parameters are rejected
Tokenizerprevious tokenizernew tokenizer
Main rolestrong all-round agent modelstronger coding and agent model
Migrationexisting workflowsdrop-in, but with checks

Sonnet 5 is not just Sonnet 4.6 with better benchmark numbers. It changes the correct API configuration.

Sonnet 5 vs Opus 4.8

Claude Opus 4.8 remains the stronger choice when higher accuracy matters on difficult agentic and computer-use tasks. Sonnet 5, however, offers far better price-performance than previous Sonnet models and approaches Opus 4.8 in several agentic workflows. (1)

TaskPrefer Sonnet 5Prefer Opus 4.8
everyday codingyessometimes
many agent runsyesfor critical work
cost controlyesno
highest accuracypartlyyes
complex architecture decisionspartlyyes
fast prototypesyesrarely needed
difficult cybersecurity workusually nomore likely, with policy context

Anthropic itself recommends Opus 4.8 for cybersecurity work that requires reduced guardrails. (1)

Sonnet 5 vs local Mac AI

The decision between Sonnet 5 and a local model comes down to privacy, offline capability, and task type.

TaskLocal model on MacClaude Sonnet 5
private offline notesbetteronly with cloud/privacy review
local transcriptionbetter with Whisper/MLXnot the main use case
short chat questionsoften enoughstronger, but cloud-based
understanding large codebaseslimited by RAM/contextvery strong
tool-using agentspossible, but hardercore strength
1M contextrarely realistic locallystandard
no data transferyes, if truly localno
best coding qualitydepends on modelvery strong
cost per requestelectricity/timeAPI cost

A practical split is:

Use local models for private, quick and offline work. Use Claude Sonnet 5 for large, difficult and agentic tasks where cloud processing is acceptable.

Privacy and data handling

Claude Sonnet 5 is a cloud model. You should not treat it like a local Ollama model.

For regular Mac users, that means:

  • do not upload confidential customer data blindly
  • do not put private documents into agent runs without review
  • check ZDR, workspace rules and provider terms for company use
  • check router data handling separately if using OpenRouter or similar services
  • keep local models for sensitive offline tasks

On the positive side, Anthropic says Sonnet 5 supports Zero Data Retention for organizations with ZDR agreements. (3)

That does not replace compliance review. For source code, customer data, research data or personal information, you need a clear local-vs-cloud policy.

Safety: stronger agents, with cyber safeguards

Sonnet 5 is stronger than Sonnet 4.6, but Anthropic also emphasizes safety boundaries. According to Anthropic, Sonnet 5 showed lower overall undesirable behavior than Sonnet 4.6 and substantially lower dangerous cyber capability than current Opus models. The model launches with real-time cyber safeguards enabled. (1)

This matters for developers because refusals may not behave like classic errors. In the API, a refusal can return successfully with stop_reason: "refusal". (3)

Production tools should:

  • detect refusals
  • explain the issue to users clearly
  • avoid endless retry loops
  • clarify allowed tasks when appropriate
  • use fallback models only deliberately

Who is Claude Sonnet 5 a good fit for?

Claude Sonnet 5 is a strong fit if you:

  • use Claude Code regularly
  • analyze larger repositories
  • plan multi-step refactors
  • process long documentation
  • use browser or terminal agents
  • care more about tool use than short chat answers
  • find Opus too expensive
  • hit quality or context limits with local models

It is not the right choice if you:

  • must work fully offline
  • cannot upload sensitive data
  • only ask short basic questions
  • need very cheap mass classification
  • can solve the task with a small local model

Recommendation for Mac users

For a realistic Mac workflow, Sonnet 5 fits like this:

  1. Local models for private notes, small summaries, drafts and offline work.
  2. Claude Sonnet 5 for coding agents, large codebases, difficult debugging and long documents.
  3. Claude Opus 4.8 or Fable 5 only for the hardest tasks where higher cost is justified.
  4. Prompt caching for recurring project context.
  5. Batch API for large non-urgent processing.
  6. Routers only intentionally, after checking pricing and data handling.

Verdict: Strong cloud agent model, not available locally

Claude Sonnet 5 is not a local AI model for Mac. Its case for Mac workflows is the combination of a 1M context window, 128K output, adaptive thinking, coding and agent capabilities, and much lower cost than Opus 4.8.

The main boundary is privacy. If you need full offline control, stay with Ollama, MLX, LM Studio or local Whisper and vision workflows. If you need large codebase analysis, browser agents, long technical documents or serious tool use, Sonnet 5 is a strong price-performance choice.

Use local AI first for private data; use Claude Sonnet 5 for hard coding and agent tasks when cloud processing is acceptable.

Footnotes

  1. https://www.anthropic.com/news/claude-sonnet-5 “Introducing Claude Sonnet 5 | Anthropic” 2 3 4 5 6

  2. https://platform.claude.com/docs/en/models/overview “Models overview - Claude Platform Docs”

  3. https://platform.claude.com/docs/en/about-claude/models/whats-new-sonnet-5 “What’s new in Claude Sonnet 5 - Claude Platform Docs” 2 3 4 5 6 7 8 9

  4. https://platform.claude.com/docs/en/build-with-claude/effort “Effort - Claude Platform Docs” 2

  5. https://docs.anthropic.com/en/docs/about-claude/pricing “Pricing - Claude Platform Docs” 2 3

Frequently Asked Questions

Is `anthropic/claude-sonnet-5` the official model name?

No. The official Anthropic API model ID is `claude-sonnet-5`. `anthropic/claude-sonnet-5` is a router/provider-style ID, for example on multi-model platforms.

Does Claude Sonnet 5 run locally on Mac?

No. Claude Sonnet 5 is not an open-weight model and does not run locally through Ollama, LM Studio or MLX.

What context window does Claude Sonnet 5 support?

Claude Sonnet 5 supports a 1M token context window by default and up to 128K output tokens in the synchronous Messages API.

How much does Claude Sonnet 5 cost?

Sonnet 5 currently costs $2 per 1M input tokens and $10 per 1M output tokens. The increase to $3 and $15 that was originally scheduled for September 1, 2026 will not occur.

Is Claude Sonnet 5 better than Opus 4.8?

Not universally. Sonnet 5 is cheaper and much stronger than Sonnet 4.6, but Opus 4.8 remains the stronger choice for higher accuracy on difficult agentic and computer-use tasks.

Is Claude Sonnet 5 good for Claude Code?

Yes. Anthropic explicitly lists Claude Code as an availability surface for Sonnet 5 and positions the model strongly for coding, tool use and agentic workflows.

What should I check when migrating from Sonnet 4.6?

Update the model ID to `claude-sonnet-5`, remove non-default sampling parameters, review adaptive thinking, recount long prompts and revisit `max_tokens` under the new tokenizer.

Transparency

Sources and review basis

5

These primary and reference sources form the basis of the technical assessment. Vendor claims and external benchmarks are identified as such in the article.

  1. anthropic.com news / claude-sonnet-5
  2. platform.claude.com models / whats-new-sonnet-5
  3. docs.anthropic.com about-claude / pricing
  4. platform.claude.com models / overview
  5. platform.claude.com build-with-claude / effort