Skip to content

fix(anthropic): update retired/retiring default model to claude-sonnet-5-5 in all runtimes - #597

Open
alexcastgonz (pcbeingused333) wants to merge 1 commit into
microsoft:mainfrom
pcbeingused333:c0549-anthropic-default-model
Open

alexcastgonz (pcbeingused333) wants to merge 1 commit into
microsoft:mainfrom
pcbeingused333:c0549-anthropic-default-model

Conversation

@pcbeingused333

Copy link
Copy Markdown

No linked issue (found while checking Anthropic model retirements).

Cause. When a .prompty file for the Anthropic provider has no model.id, each runtime falls back to a hard-coded Sonnet id that Anthropic has retired or is retiring (see the model deprecations page on platform.claude.com):

  • C# (AnthropicExecutor.BuildRequestBody): claude-sonnet-4-20250514, already retired (Claude Sonnet 4, 2026-06-15), so such prompts fail today.
  • Python (_build_chat_args) and TypeScript (buildChatArgs): claude-sonnet-4-5-20250929, which retires on 2026-11-30.

Fix. Use claude-sonnet-5-5 (the Claude API ID of Sonnet 5.5 on Anthropic's live models overview) as the fallback in all three runtimes. The Anthropic READMEs (C#, TypeScript, Rust) now use current ids in their examples, and the C# supported-models list drops the retired Claude 3 entries.

Tests. One test per runtime builds the request args with no model.id and asserts the fallback (red before, green after): TestBuildChatArgs::test_default_model_when_id_missing (pytest), "falls back to the current default model when model.id is missing" (vitest), and BuildRequestBody_WithoutModelId_UsesCurrentDefaultModel (xUnit), which replaces the previous DefaultModel_IsClaude test that only asserted on a local expression and never exercised the executor. The Anthropic test projects pass.


This PR was prepared with the help of an AI assistant (Claude Code), and the author is responsible for the change.

…t-5-5 in all runtimes

A .prompty without model.id fell back to a hard-coded Sonnet id in each runtime: the C# executor used claude-sonnet-4-20250514 (retired 2026-06-15) and Python/TypeScript used claude-sonnet-4-5-20250929 (retires 2026-11-30). Use the current claude-sonnet-5-5 everywhere and pin the fallback with a test in each runtime. The C# test replaces a tautological one that never called the executor.

This branch has not been deployed

No deployments
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