Repository navigation
fix(llm): replace the retired claude-sonnet-4-20250514 default - #70
Open
pcbeingused333 wants to merge 3 commits into
Open
pcbeingused333 wants to merge 3 commits into
pcbeingused333 wants to merge 3 commits into
Conversation
With LLM_PROVIDER=anthropic and no ANTHROPIC_MODEL, FrontierAgent requested claude-sonnet-4-20250514, which Anthropic retired on 2026-06-15, so every call failed. Default to claude-sonnet-5-5. Claude 5 models reject non-default sampling parameters, so omit the temperature for them (it is still sent as 0.3 for older models when thinking is off). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… path Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
zhanghanduo
approved these changes
Nov 2, 2026
zhanghanduo
left a comment
Collaborator
There was a problem hiding this comment.
Fixed the compatibility gap when switching the default to Sonnet 5.5. Legacy thinking.type=enabled settings now migrate to adaptive thinking for models that reject manual budgets. The migration uses the resolved model, so role and fallback overrides retain manual budgets when targeting older models.
Added regression tests that inspect the actual request payload across both factory paths. All 46 targeted tests and Ruff checks pass. No live API calls were made.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Issue or Description of Change
2. Or, if no issue exists, describe the change:
Problem:
AnthropicLlm.modeldefaults toclaude-sonnet-4-20250514(Claude Sonnet 4, retired on 2026-06-15) and the Vertex AI classClaudetoclaude-3-5-sonnet-v2@20241022, also retired, so a model created without a name now fails on every request.Solution:
Default both to
claude-sonnet-4-6. On Vertex AI the current generation uses the undated id; the@dateform is for dated snapshots.Testing Plan
Unit Tests:
Added
test_default_models_are_not_retired(both classes).pytest tests/unittests/models/test_anthropic_llm.py: 185 passed (anthropic 1.15.0); on the base commit only the new test fails.pyink --checkandisort --checkare clean on the touched files.Manual End-to-End (E2E) Tests:
Not run against the real API.
Checklist
Additional context
This change was made with Claude Code; the tests above were run on the branch.
🤖 Generated with Claude Code