Skip to content

chore: bump default model to claude-sonnet-5 - #102

Merged
Salil Das (sadlilas) merged 1 commit into
mainfrom
fix/default-model-sonnet-5
Aug 25, 2026
Merged

chore: bump default model to claude-sonnet-5#102
Salil Das (sadlilas) merged 1 commit into
mainfrom
fix/default-model-sonnet-5

Conversation

@sadlilas

@sadlilas Salil Das (sadlilas) commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Bump the model used when a caller supplies no default_model, from claude-sonnet-4-5 to claude-sonnet-5. README.md is updated in the same commit so the documented default matches the code.

This is housekeeping, not a bug fix. Nothing is broken today — see Verification below.

What is not wrong

The current default works. Verified with live API calls across six configurations:

Scenario claude-sonnet-4-5 (current) claude-sonnet-5 (this PR)
Streaming (normal session) works works
Non-streaming works works
Extended thinking (reasoning_effort: high) works works
Explicit temperature works works
1M context enabled works works
Prompt caching enabled works works

claude-sonnet-4-5 is also still live on the Models API and is not in this module's _DEPRECATED_MODELS list. No user has reported a problem. This PR fixes no defect.

What this changes, and who it reaches

Only callers that supply no default_model. That literal was last updated on 2025-10-19 (167d4ad) and is now 11 months stale.

Reachability was reproduced, not inferred. Running non-interactive provider setup returns:

config keys   : api_key, base_url, enable_1m_context,
                enable_prompt_caching, fallback_on_overload
default_model : absent

No model is written, so container, CI, and ephemeral test sessions land on this literal. Interactive setup (which prompts for a model) and any pinned config are unaffected.

Why do it anyway

  1. A default is the promise made to callers who expressed no preference. Today that promise is a model from October 2025.
  2. Models do get retired here. claude-sonnet-4-20250514 retired 2026-06-15. Moving a default on a quiet day costs one line; moving it under retirement pressure costs an outage.
  3. Trivially reversible. One value, one line. No new config surface is introduced that could accrue consumers.

Caveats for callers on the default

  • temperature is no longer sent. Sonnet 5 does not accept it, so the provider correctly omits it. This is a silent behavior change for anyone who relied on it.
  • Effective cost rises. Headline rates are identical ($3 / $15 per MTok), but per _cost.py:62-68 the Sonnet 5 tokenizer maps the same text to ~1.0–1.35x more tokens.

No output-quality claim is made. Sonnet 5 was verified current and working. It was not measured as better.

What Changed

  • amplifier_module_provider_anthropic/__init__.py:638 — the default model literal
  • README.md:32-33 — supported-model list: default is now claude-sonnet-5; claude-opus-5 replaces claude-opus-4-6 as most capable (both verified live)
  • README.md:43,45,275 — config examples; the temperature example is annotated, since Sonnet 5 ignores it
  • tests/test_error_translation.py:322,585 — required, not cosmetic: _make_provider() in that file passes no default_model, so it inherits the module literal

Updating README.md alongside the code matches the precedent set by 167d4ad, which changed both together.

Scope Notes

Intentionally not modified:

  • The 1M-context section (README.md:222-248) — it documents Sonnet 4.5's 1M context support, which the live Models API confirms (max_input_tokens = 1000000). Its examples correctly pin claude-sonnet-4-5.
  • Dated-form claude-sonnet-4-5-20250929 references in capability/cost parsing tests — still-valid identifiers whose parsing those tests verify
  • _cost.py:43 rate entry for claude-sonnet-4-5 — still a valid model
  • test_fallback.py:288/296 — passes a model explicitly, so it does not rely on the default

Verification

  • Full test suite: 658 tests pass
  • 12 live API calls (6 scenarios × both models), tabulated above — all succeeded
  • Non-interactive setup reproduced to confirm default_model is genuinely absent
  • claude-sonnet-5 confirmed live: created 2026-06-29, resolves to claude-sonnet-5, effort tiers through max
  • claude-opus-5 and claude-haiku-4-5 (the other names in the refreshed README list) confirmed live and present in the cost table

Generated with Amplifier

@sadlilas
Salil Das (sadlilas) force-pushed the fix/default-model-sonnet-5 branch from d4e9280 to 9f0a288 Compare August 24, 2026 17:30
Housekeeping, not a bug fix. The current default claude-sonnet-4-5 still works
-- verified live across streaming, non-streaming, extended thinking, explicit
temperature, 1M context, and prompt caching -- and it is not on the deprecation
list in this module. Nothing is broken today.

What this changes: the model used when a caller supplies no default_model. That
literal was last updated on 2025-10-19 (167d4ad); it is now 11 months stale.

Reachability was reproduced rather than inferred: non-interactive provider setup
returns a config with no default_model key, so container, CI, and ephemeral test
sessions land on this literal.

Rationale:
- A default is the promise made to callers who expressed no preference, and that
  promise has gone stale.
- Models do get retired here (claude-sonnet-4-20250514 retired 2026-06-15).
  Moving a default on a quiet day costs one line; moving it under retirement
  pressure costs an outage.
- One value, one line, trivially reversible. No new surface accrues consumers.

Caveats for callers on the default:
- temperature is no longer sent. Sonnet 5 does not accept it, so the provider
  correctly omits it -- a silent behavior change for anyone who relied on it.
- Effective cost rises. Headline rates are identical ($3/$15 per MTok), but per
  _cost.py:62-68 the Sonnet 5 tokenizer maps the same text to ~1.0-1.35x more
  tokens.

No output-quality claim is made. Sonnet 5 was verified current and working, not
measured as better.

README.md is updated in the same commit, matching the precedent set by 167d4ad,
which changed the code default and the README together. The supported-model list
is refreshed (claude-opus-5 is now the most capable model; verified live) and the
temperature example is annotated.

Test suite: 658 tests pass.

Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@sadlilas
Salil Das (sadlilas) force-pushed the fix/default-model-sonnet-5 branch from 9f0a288 to 1a5cc6d Compare August 25, 2026 22:58
@sadlilas Salil Das (sadlilas) changed the title fix: bump default model to claude-sonnet-5 chore: bump default model to claude-sonnet-5 Aug 25, 2026
@sadlilas
Salil Das (sadlilas) merged commit 121eac3 into main Aug 25, 2026
7 checks passed
@sadlilas
Salil Das (sadlilas) deleted the fix/default-model-sonnet-5 branch August 25, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant