Skip to content

Commit 59eaab8

Browse files
feat(models): update the capable-tier Sonnet to Claude Sonnet 5 (#1198)
Swaps the default "capable" model from claude-sonnet-4-6 to the newly released claude-sonnet-5 (GA 2026-06-09) across the registry, adaptive routing, providers, telemetry, token estimation, and the literal model_id defaults scattered through the codebase. Verified the ID against the live Anthropic models doc before changing anything. Pricing is unchanged: $3/$15 per MTok standard (introductory $2/$10 through 2026-08-31). 1M context, 128K max output, adaptive thinking, effort defaults to high. Sonnet 4.6 is now a legacy model. - Full claude-sonnet-4-6 -> claude-sonnet-5 swap across src/ + tests/ (65 files); matching test expectations updated so CI stays green. - Registry CAPABLE ModelInfo + TIER_PRICING comment refreshed. - Stale "Sonnet 4.6" prose comments updated to "Sonnet 5". - Left claude-sonnet-4-5 (legacy 4.5) references untouched. - CHANGELOG Unreleased "Changed" entry added. 962 model/routing/pricing/telemetry/provider tests pass. The only failures are the live-API integration tests in tests/models/test_sonnet_opus_fallback.py (skipif HAS_API_KEY) — a local creditless-key 400, skipped in CI; the new ID is accepted (no 404), confirming the swap. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d46e906 commit 59eaab8

66 files changed

Lines changed: 183 additions & 171 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- **Default "capable" model is now Claude Sonnet 5
13+
(`claude-sonnet-5`).** Replaces `claude-sonnet-4-6` across the model
14+
registry, adaptive routing, providers, telemetry, and token
15+
estimation. Pricing is unchanged ($3/$15 per MTok standard;
16+
introductory $2/$10 through 2026-08-31). 1M context, 128K max output,
17+
adaptive thinking; `effort` defaults to `high`.
18+
1019
## [9.3.0] — 2026-06-30
1120

1221
**Dynamic communication to improve the human/AI exchange.** Attune now

src/attune/agent_factory/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,11 @@ def get_model_for_tier(self, tier: str, provider: str = "anthropic") -> str:
307307
defaults = {
308308
"anthropic": {
309309
"cheap": "claude-haiku-4-5",
310-
"capable": "claude-sonnet-4-6",
310+
"capable": "claude-sonnet-5",
311311
"premium": "claude-opus-4-8",
312312
},
313313
}
314314
return defaults.get(provider, defaults["anthropic"]).get(
315315
tier,
316-
"claude-sonnet-4-6",
316+
"claude-sonnet-5",
317317
)

src/attune/agents/release/release_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
MODEL_CONFIG = {
4848
"cheap": "claude-haiku-4-5",
49-
"capable": "claude-sonnet-4-6",
49+
"capable": "claude-sonnet-5",
5050
"premium": "claude-opus-4-8",
5151
}
5252

src/attune/cli_commands/memory_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
# CAPABLE-tier stable alias — tracks the latest Sonnet minor, never retires
2727
# (avoids pinning a dated snapshot that EOLs).
28-
_DEFAULT_MODEL = "claude-sonnet-4-6"
28+
_DEFAULT_MODEL = "claude-sonnet-5"
2929
# Required beta header for the memory_20250818 tool + context management.
3030
_MEMORY_BETA = "context-management-2025-06-27"
3131
_DEFAULT_MAX_TOKENS = 4096

src/attune/cli_minimal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ def _add_misc_subparsers(subparsers: argparse._SubParsersAction) -> None:
455455
"--path", help="Memory namespace root the agent addresses (default /memories)"
456456
)
457457
memory_agent_parser.add_argument(
458-
"--model", help="Model id (default: claude-sonnet-4-6, the CAPABLE tier)"
458+
"--model", help="Model id (default: claude-sonnet-5, the CAPABLE tier)"
459459
)
460460
memory_agent_parser.add_argument("--user-id", dest="user_id", help="Namespace memory per user")
461461
memory_agent_parser.add_argument(

src/attune/config/agent_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ def get_model_id(self) -> str:
149149
models = {
150150
Provider.ANTHROPIC: {
151151
ModelTier.CHEAP: "claude-haiku-4-5",
152-
ModelTier.CAPABLE: "claude-sonnet-4-6",
152+
ModelTier.CAPABLE: "claude-sonnet-5",
153153
ModelTier.PREMIUM: "claude-opus-4-8",
154154
},
155155
}
156156

157157
return models.get(self.provider, {}).get(
158158
self.model_tier,
159-
"claude-sonnet-4-6", # Fallback
159+
"claude-sonnet-5", # Fallback
160160
)
161161

162162
def for_book_production(self) -> "BookProductionConfig":

src/attune/config/sections/routing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RoutingConfig:
3333

3434
default_tier: Literal["cheap", "capable", "premium"] = "capable"
3535
cheap_model: str = "claude-haiku-4-5"
36-
capable_model: str = "claude-sonnet-4-6"
36+
capable_model: str = "claude-sonnet-5"
3737
premium_model: str = "claude-opus-4-8"
3838
auto_tier_selection: bool = True
3939
cost_optimization: bool = True
@@ -67,7 +67,7 @@ def from_dict(cls, data: dict) -> "RoutingConfig":
6767
return cls(
6868
default_tier=data.get("default_tier", "capable"),
6969
cheap_model=data.get("cheap_model", "claude-haiku-4-5"),
70-
capable_model=data.get("capable_model", "claude-sonnet-4-6"),
70+
capable_model=data.get("capable_model", "claude-sonnet-5"),
7171
premium_model=data.get("premium_model", "claude-opus-4-8"),
7272
auto_tier_selection=data.get("auto_tier_selection", True),
7373
cost_optimization=data.get("cost_optimization", True),

src/attune/config/xml_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ class AdaptiveConfig:
5656
model_tier_mapping: dict[str, str] = field(
5757
default_factory=lambda: {
5858
"simple": "claude-haiku-4-5",
59-
"moderate": "claude-sonnet-4-6",
60-
"complex": "claude-sonnet-4-6",
59+
"moderate": "claude-sonnet-5",
60+
"complex": "claude-sonnet-5",
6161
"very_complex": "claude-opus-4-8",
6262
},
6363
)

src/attune/help/polish.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def _call_llm(
113113
# Stable alias — claude-sonnet-4-20250514 retires 2026-06-15.
114114
# The stable alias routes to the same checkpoint and stays
115115
# valid across model upgrades.
116-
model="claude-sonnet-4-6",
116+
model="claude-sonnet-5",
117117
max_tokens=4096,
118118
system=_SYSTEM_PROMPT,
119119
messages=[{"role": "user", "content": user_message}],

src/attune/llm/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def _create_provider(
231231
if provider == "anthropic":
232232
return AnthropicProvider(
233233
api_key=api_key,
234-
model=model or "claude-sonnet-4-6",
234+
model=model or "claude-sonnet-5",
235235
**kwargs,
236236
)
237237
raise ValueError(f"Unknown provider: {provider}")

0 commit comments

Comments
 (0)