Skip to content

fix(llm): replace the retired claude-sonnet-4-20250514 default - #70

Open
pcbeingused333 wants to merge 3 commits into
ApodexAI:mainfrom
pcbeingused333:fix/anthropic-default-model
Open

pcbeingused333 wants to merge 3 commits into
ApodexAI:mainfrom
pcbeingused333:fix/anthropic-default-model

Conversation

@pcbeingused333

Copy link
Copy Markdown

Link to Issue or Description of Change

2. Or, if no issue exists, describe the change:

Problem:

AnthropicLlm.model defaults to claude-sonnet-4-20250514 (Claude Sonnet 4, retired on 2026-06-15) and the Vertex AI class Claude to claude-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 @date form is for dated snapshots.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

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 --check and isort --check are clean on the touched files.

Manual End-to-End (E2E) Tests:

Not run against the real API.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

This change was made with Claude Code; the tests above were run on the branch.

🤖 Generated with Claude Code

pcbeingused333 and others added 3 commits October 29, 2026 08:35
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 zhanghanduo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

2 participants