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.
| Name | Meaning |
|---|---|
claude-sonnet-5 | official Anthropic API model ID |
anthropic/claude-sonnet-5 | router/provider-style ID, for example on multi-model platforms |
anthropic.claude-sonnet-5 | Bedrock-style provider format |
claude-sonnet-5 on Google Cloud | Google 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
| Property | Claude Sonnet 5 |
|---|---|
| Provider | Anthropic |
| Official API ID | claude-sonnet-5 |
| Launch date | June 30, 2026 |
| Model family | Sonnet |
| Main focus | Coding, agents, tool use, knowledge work |
| Input | Text and image |
| Output | Text |
| Context window | 1M tokens |
| Max output | 128K tokens |
| Thinking | Adaptive thinking |
| Default effort | high by default; low/medium/high/xhigh/max can be set explicitly (4) |
| Local Mac inference | No |
| Ollama / LM Studio / MLX | No |
| Claude Code | Yes |
| Claude API | Yes |
| AWS / Google Cloud / Microsoft Foundry | Yes, depending on platform |
| Zero Data Retention | Supported for organizations with ZDR agreements |
| Priority Tier | Not 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.
| Question | Answer |
|---|---|
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 status | Input | Output |
|---|---|---|
| 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:
| Part | Calculation | Cost |
|---|---|---|
| Input | 0.1 × $2 | $0.20 |
| Output | 0.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:
- Recount prompts.
- Revisit
max_tokens. - Check real costs from logs.
- Use prompt caching for recurring project context.
- 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_tokensis a hard limit for the total output, including thinking plus final response.- Long agent workflows need more careful output budgeting.
- The
effortparameter 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)
| Point | Sonnet 4.6 | Sonnet 5 |
|---|---|---|
| Context | 1M | 1M |
| Max output | 128K | 128K |
| Thinking | not automatic when no thinking field is provided | adaptive thinking by default |
| Sampling | older workflows may use parameters | non-default sampling parameters are rejected |
| Tokenizer | previous tokenizer | new tokenizer |
| Main role | strong all-round agent model | stronger coding and agent model |
| Migration | existing workflows | drop-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)
| Task | Prefer Sonnet 5 | Prefer Opus 4.8 |
|---|---|---|
| everyday coding | yes | sometimes |
| many agent runs | yes | for critical work |
| cost control | yes | no |
| highest accuracy | partly | yes |
| complex architecture decisions | partly | yes |
| fast prototypes | yes | rarely needed |
| difficult cybersecurity work | usually no | more 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.
| Task | Local model on Mac | Claude Sonnet 5 |
|---|---|---|
| private offline notes | better | only with cloud/privacy review |
| local transcription | better with Whisper/MLX | not the main use case |
| short chat questions | often enough | stronger, but cloud-based |
| understanding large codebases | limited by RAM/context | very strong |
| tool-using agents | possible, but harder | core strength |
| 1M context | rarely realistic locally | standard |
| no data transfer | yes, if truly local | no |
| best coding quality | depends on model | very strong |
| cost per request | electricity/time | API 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:
- Local models for private notes, small summaries, drafts and offline work.
- Claude Sonnet 5 for coding agents, large codebases, difficult debugging and long documents.
- Claude Opus 4.8 or Fable 5 only for the hardest tasks where higher cost is justified.
- Prompt caching for recurring project context.
- Batch API for large non-urgent processing.
- 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
-
https://www.anthropic.com/news/claude-sonnet-5 “Introducing Claude Sonnet 5 | Anthropic” ↩ ↩2 ↩3 ↩4 ↩5 ↩6
-
https://platform.claude.com/docs/en/models/overview “Models overview - Claude Platform Docs” ↩
-
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
-
https://platform.claude.com/docs/en/build-with-claude/effort “Effort - Claude Platform Docs” ↩ ↩2
-
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
These primary and reference sources form the basis of the technical assessment. Vendor claims and external benchmarks are identified as such in the article.