# Sonnet 5 vs Opus 4.8：它们如何工作以及何时使用

Stet publishes a public search API over its indexed pages; the guide is at https://www.stet.sh/agents/agent-access.

Source: https://www.stet.sh/blog/sonnet-5-vs-opus-4-8-reasoning-dial
Source observed: 2026-11-15T21:03:04.319Z
Last checked: 2026-11-19T11:08:43.433+00:00
Indexed: 2026-11-15T21:07:48.463+00:00

---

# Sonnet 5 vs Opus 4.8：它们如何工作以及何时使用

**July 8, 2026 · Updated July 16, 2026 · 11 min read** · [Ben, Founder, Stet](https://www.stet.sh/about)

We used a private evaluation to compare Sonnet 5 and Opus 4.8 on **24 real tasks** from two open-source repositories—`graphql-go-tools` (Go) and `sqlparser-rs` (Rust). Both models ran every task in Claude Code at **low, medium, high, xhigh, and max**, one run per arm. A GPT-5.4 pointwise judge scored equivalence to the maintainers’ merged fix and eight craft dimensions. Costs are cache-aware geometric means per task.

Sonnet converted higher effort into more checking, longer trajectories, and patches judged clearer and more intentional. Opus stayed comparatively flatter through high effort; the judge more often favored Opus for simplicity, robustness, and minimal diffs. Neither profile is universally better. Cost changes sharply with the reasoning dial: Sonnet cost **0.62×** Opus at low, **0.81×** at medium, was effectively tied at high and xhigh, and cost **1.37×** Opus at max.

## The short answer

| Constraint | Route to try first | Why on this slice |
|---|---|---|
| Best cost/performance default | **Opus high** | Equivalence was already near Opus’s plateau, while cost rose sharply beyond high. |
| Ambiguous or verification-heavy work | **Sonnet xhigh** | Sonnet equivalence peaked at xhigh, where 7 of 8 craft dimensions also leaned Sonnet. |
| Minimal diffs and scope control | **Opus high** | Opus had lower footprint risk on 18 of 22 shared tasks and stayed near its performance plateau. |
| Routine work where high is unnecessary | **Opus medium** | Opus was already near its plateau at medium; low was not the general-value route. |
| Safe default at max | **Neither** | Extra spend did not support a broad default for either model. |

This is a routing policy from one local slice, not a universal model hierarchy like [DeepSWE](https://deepswe.datacurve.ai/) or [FrontierCode](https://cognition.com/blog/frontier-code-1.1).

## Cost ladder

The ratio is Sonnet 5 cost divided by Opus 4.8 cost; below 1.0× means Sonnet is cheaper.

| Effort | Sonnet/Opus cost ratio | Interpretation |
|---|---:|---|
| Low | 0.62× | Sonnet cheaper |
| Medium | 0.81× | Sonnet cheaper |
| High | 1.17× | Effectively tied |
| Xhigh | 1.01× | Effectively tied |
| Max | 1.37× | Opus cheaper |
| Sonnet xhigh vs Opus high | 1.81× | Opus high cheaper |

Sonnet’s geometric mean spans **$0.98/task** at low to **$8.77/task** at max, a **9.0×** span. Opus spans about **$1.58** to **$6.41**, roughly **4×**.

## Quality trade

The judge scored clarity, simplicity, coherence, intentionality, robustness, instruction adherence, scope discipline, and diff minimality. These are behavioral fingerprints rather than a universal leaderboard: margins are often small and dimensions are not independent.

- **Clarity leaned Sonnet at all six comparison points.** At high, Sonnet led 20 of 24 tasks with 2 ties; at xhigh it led 18 of 21.
- **Intentionality leaned Sonnet at all six points.**
- **Diff minimality leaned Opus at all six points.** At low, Opus led 21 of 24 with zero ties; in Sonnet xhigh versus Opus high, Opus led 17 of 22.
- **Simplicity leaned Opus** at every setting except xhigh, where Sonnet led 11 to 9.
- **Robustness leaned Opus at five of six points.** Xhigh was near-even at 9 to 11.

### Eight-dimension directional board

| Dimension | Low | Medium | High | Xhigh | Max | Xhigh / high |
|---|---|---|---|---|---|---|
| Clarity | Sonnet | Sonnet | Sonnet | Sonnet | Sonnet | Sonnet |
| Intentionality | Sonnet | Sonnet | Sonnet | Sonnet | Sonnet | Sonnet |
| Diff minimality | Opus | Opus | Opus | Opus | Opus | Opus |
| Simplicity | Opus | Opus | Opus | Sonnet | Opus | Opus |
| Robustness | Opus | Opus | Opus | Even | Opus | Opus |

Sonnet’s share of the eight-dimension panel was **2/8** at low, **3/8** at medium, **4/8** at high, **7/8** at xhigh, **4/8** at max, and **4/8** for xhigh versus high. Xhigh was the only setting where Sonnet carried most of the panel.

On `sqlparser#1472`, both models added the same two dialect switches. Sonnet wrote one common negative test covering every dialect supporting neither operator, making the global invariant clearer and more intentional. Opus kept coverage local to Hive and Postgres, producing a simpler, more minimal change.

### Footprint risk

The 0–100 footprint score blends divergence from the merged reference with absolute change surface; lower means less measured risk.

| Effort | Sonnet | Opus |
|---|---:|---:|
| Low | 19.6 | 21.2 |
| Medium | 25.4 | 24.1 |
| High | 24.6 | 23.2 |
| Xhigh | 27.6 | 30.8 |
| Max | 35.8 | 29.8 |

Coverage was 24 tasks at every point except xhigh: Sonnet 22, Opus 23. On the 22 shared tasks for the recommended route, Opus high averaged **21.5** versus Sonnet xhigh **27.6**, and Opus was lower on **18/22** tasks.

### Patch composition

Mean lines added per included task; totals are rounded independently.

| Effort | Model | Implementation lines | Tests + fixtures | Total added | Tests + fixtures share |
|---|---|---:|---:|---:|---:|
| Low | Sonnet | 114.5 | 78.0 | 192.6 | 40.5% |
| Low | Opus | 128.0 | 85.5 | 213.5 | 40.1% |
| Medium | Sonnet | 135.0 | 104.9 | 239.9 | 43.7% |
| Medium | Opus | 158.7 | 113.8 | 272.4 | 41.8% |
| High | Sonnet | 139.2 | 127.6 | 266.8 | 47.8% |
| High | Opus | 143.2 | 128.5 | 271.7 | 47.3% |
| Xhigh | Sonnet | 160.1 | 140.7 | 300.8 | 46.8% |
| Xhigh | Opus | 163.6 | 168.0 | 331.6 | 50.7% |
| Max | Sonnet | 172.0 | 246.8 | 418.7 | 58.9% |
| Max | Opus | 156.0 | 183.5 | 339.5 | 54.1% |

At max, tests and fixtures made up 58.9% of Sonnet’s added lines and 54.1% of Opus’s. For the recommended route pair, the mix was nearly identical—46.8% for Sonnet xhigh and 47.3% for Opus high—so the footprint gap is also about churn, file breadth, non-test scope, and overlap with the merged patch.

## Matching the real fix

We use the maintainers’ merged code as the answer key and grade equivalence on a 0–4 scale.

| Effort | Sonnet mean | Opus mean |
|---|---:|---:|
| Low | 2.62 | 3.00 |
| Medium | 2.94 | 3.09 |
| High | 2.93 | 3.16 |
| Xhigh | **3.21** | 3.17 |
| Max | 2.91 | 3.14 |

Opus stayed nearly flat. Sonnet formed an inverted U, peaking at xhigh—the only setting above Opus.

Head-to-head equivalence results:

| Effort | Sonnet higher | Ties | Opus higher | Tasks |
|---|---:|---:|---:|---:|
| Low | 6 | 5 | 13 | 24 |
| Medium | 4 | 9 | 11 | 24 |
| High | 8 | 8 | 8 | 24 |
| Xhigh | 9 | 7 | 5 | 21 |
| Max | 7 | 7 | 10 | 24 |
| Sonnet xhigh vs Opus high | 8 | 10 | 4 | 22 |

Sonnet patches judged fully equivalent: **6/24** at low, **9/24** at medium, **9/24** at high, **10/22** at xhigh, and **8/24** at max.

## How behavior diverges

Sonnet’s median session steps rose from **81** at low to **269** at max, while median output tokens rose from **13.7k** to **113.6k**. Opus stayed flatter through high—**78 → 100.5 → 98.5** steps—then rose to **167** at xhigh and **261.5** at max. Opus output tokens began above Sonnet at low (**20.3k**) but stayed near **34k** through medium and high before reaching **91.2k** at max.

Examples:

- `sqlparser#1472`, Sonnet xhigh: the patch kept the same 10-edit, six-file footprint as low, while shell commands rose from 25 to 79.
- `graphql#1099`, Sonnet xhigh: it wrote a temporary reproduction test, cited GraphQL specification sections 5.6 and 5.8.5, confirmed the failure, reverted the temporary test, and implemented the real fix. Extra effort went into understanding rather than extra shipped changes.

## Same task across both models

These are illustrative sessions, not statistical summaries.

- **`sqlparser#1398`, both low:** both converged on `require_interval_qualifier`, but Opus followed the task specification, kept BigQuery in the reject set, rewrote the conflicting test, and explicitly surfaced the conflict. Sonnet treated the existing test suite as authoritative, reverted BigQuery enforcement during the session, and explained the rationale only in its final summary.
- **`sqlparser#1472`:** Opus’s extra effort changed what it edited; Sonnet’s changed how much it checked. Opus medium touched `generic.rs`, while high left it alone after checking existing tests. Sonnet xhigh added empirical verification, clippy triage, and two extra full-suite runs.
- **`graphql#1128`, both xhigh:** both found the planner bug and wrote temporary reproduction tests. Sonnet stopped after proving the planner emitted no fetch. Opus tested runtime behavior, found an empty-data `__typename` failure, added the resolve-layer fallback, and converted the experiment into a permanent regression test covering all three operation types. Opus used fewer tool calls (**97 vs 129**) while touching more files (**8 vs 5**). Sonnet closed the same runtime gap by baking the value into the plan at high effort, so this example is a session-specific blind spot rather than a fixed model trait.

## Max: not a default

We do not recommend max as a default for either model. Sonnet max sometimes touched extra subscription-layer files, added concurrency tests absent from the reference, or repeated shell exploration. On `sqlparser#2174`, both max runs converged on an attribute macro backed by all **142** dialect-method signatures, but Opus spent its budget on design analysis and a drift test while Sonnet used **71 of 117** tool calls for shell commands and generated a temporary Rust program in `/tmp`.

Opus max had one notable signal: its clarity grader beat Opus xhigh on **20 of 23 tasks with zero losses**, but it cost **1.34×** the xhigh price and represents one grader’s lens. That is too narrow to justify a general max default.

## Routing rule

For this slice:

1. Start with **Opus high** for the best cost/performance balance and narrow diffs.
2. Route ambiguous, verification-heavy, or reviewer-expensive work to **Sonnet xhigh**.
3. Use **Opus medium** for routine work where high is unnecessary.
4. Do not default either model to **max**.

This is evidence from 24 tasks, two repositories, one run per arm, and our graders—not a global ranking. [Measure your own repository, review patterns, and harness with Stet.](https://www.stet.sh/private)

## FAQ

### How do Sonnet 5 and Opus 4.8 behave differently?

Sonnet’s activity rises across the dial, with longer sessions and more output tokens. Opus stays comparatively flat through high, then jumps at xhigh. The judge favors Sonnet on clarity and intentionality and Opus on diff minimality, simplicity, and robustness; footprint also favors Opus high over Sonnet xhigh on shared route tasks.

### When should we use each?

Use Opus high for cost/performance and minimal diffs, Sonnet xhigh for ambiguous or verification-heavy tasks, and Opus medium for routine work. Do not make max the default.

### When is Sonnet cheaper?

Sonnet costs 0.62× Opus at low and 0.81× at medium. High and xhigh are effectively tied. At max Sonnet costs 1.37× Opus. Sonnet’s own dial spans 9.0× from low to max.

### Is max worth it?

Not as a default on this corpus. Sonnet’s quality curves fall back from xhigh. Opus max’s clarity advantage over xhigh is 20 of 23 tasks with zero losses, but costs 1.34× as much and is too narrow to support a general rule.

[Methodology](https://www.stet.sh/methodology)

---

[Read this page’s summary](https://www.stet.sh/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.stet.sh%2Fblog%2Fsonnet-5-vs-opus-4-8-reasoning-dial&trace=t_5da45423e484)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Stet’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.stet.sh/agents/agent/faq?q={question}&trace=t_5da45423e484`

[Tool guide and examples](https://www.stet.sh/agents/agent-access) · [OpenAPI](https://www.stet.sh/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.stet.sh/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.stet.sh%2Fblog%2Fsonnet-5-vs-opus-4-8-reasoning-dial). Opening a form does not execute a tool.