Skip to content

fix(providers): update Anthropic default model to claude-sonnet-4-6 - #4687

Merged
Re-bin merged 1 commit into
HKUDS:mainfrom
bingqilinweimaotai:fix/update-anthropic-default-model
Jul 3, 2026
Merged

Re-bin merged 1 commit into
HKUDS:mainfrom
bingqilinweimaotai:fix/update-anthropic-default-model

Conversation

@bingqilinweimaotai

Copy link
Copy Markdown
Contributor

Update the stale default model from claude-sonnet-4-20250514 to claude-sonnet-4-6 across the codebase:

  • AnthropicProvider.init default_model parameter
  • docs/my-tool.md example output
  • skills/my/references/examples.md model references
  • tests/agent/tools/test_self_tool.py mock setup

Fixes #4675

@bingqilinweimaotai
bingqilinweimaotai marked this pull request as ready for review July 3, 2026 01:30
@bingqilinweimaotai
bingqilinweimaotai force-pushed the fix/update-anthropic-default-model branch from 0f5e4f8 to df390cf Compare July 3, 2026 01:37
Update the stale default model from claude-sonnet-4-20250514 to
claude-sonnet-4-6 across the codebase:

- AnthropicProvider.__init__ default_model parameter
- docs/my-tool.md example output
- skills/my/references/examples.md model references
- tests/agent/tools/test_self_tool.py mock setup

Fixes HKUDS#4675

Co-Authored-By: Claude <noreply@anthropic.com>
@chengyongru chengyongru removed the valid label Jul 3, 2026

@chengyongru chengyongru 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.

Automated PR review by nanobot. This is not a human maintainer review or approval.

I found one issue with the updated Anthropic default model ID.

Comment thread nanobot/providers/anthropic_provider.py Outdated
@@ -58,7 +58,7 @@ def __init__(
self,
api_key: str | None = None,
api_base: str | None = None,
default_model: str = "claude-sonnet-4-20250514",
default_model: str = "claude-sonnet-4-6-20250514",

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.

The Anthropic model ID docs say Claude 4.6 and later use dateless canonical IDs, and list claude-sonnet-4-6 as the Claude API format. This new default keeps the old dated suffix pattern, so any config path that relies on AnthropicProvider's default would send claude-sonnet-4-6-20250514 upstream instead of the documented Sonnet 4.6 model ID. That turns the default-model refresh into a runtime model-not-found path for new Anthropic users.

Reference: https://docs.anthropic.com/en/docs/about-claude/models/model-ids-and-versions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

已完成修改并测试

@chengyongru chengyongru added priority: p1 Important user-impacting issue or project priority with bounded impact or a reasonable workaround. valid labels Jul 3, 2026
@bingqilinweimaotai

Copy link
Copy Markdown
Contributor Author

官方文档特别说从 Claude 4.6 开始使用“无日期但仍是 pinned snapshot”的格式,修正

@bingqilinweimaotai
bingqilinweimaotai force-pushed the fix/update-anthropic-default-model branch from df390cf to 053cafe Compare July 3, 2026 02:00

@chengyongru chengyongru 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.

LGTM

@chengyongru chengyongru added bug Something isn't working provider labels Jul 3, 2026
@Re-bin
Re-bin merged commit b19a744 into HKUDS:main Jul 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: p1 Important user-impacting issue or project priority with bounded impact or a reasonable workaround. provider valid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants