fix(wizard): replace retired Claude Sonnet 4 default with claude-sonnet-5-5 (#7585)

* fix(wizard): replace retired Claude Sonnet 4 default with claude-sonnet-5-5

The setup wizard's Anthropic default model is now `claude-sonnet-5-5` instead of the retired `claude-sonnet-4-20250514`. A new per-model `model_omitted_config` field makes the wizard leave out the extended-thinking (`budget_tokens`) and thinking-disabled templates for that model only, since Sonnet 5.5 rejects them; the other Claude models are unchanged. The Anthropic examples in `config.example.yaml` and `configuration.mdx` (which used `claude-3-5-sonnet-20241022`) now use `claude-sonnet-5-5` without those settings, and the change also adds a regression test and a CHANGELOG entry.

Notice anthropic-retired-models-2026-10-27 about api.anthropic.com's API describes the change. It was read from a file and is not signed by the provider.

* Update CHANGELOG with PR reference #7585

Added a reference to pull request #7585 in the CHANGELOG.

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
Agustin Torres 2026-10-26 23:38:03 -03:00 committed by GitHub
parent c48447a4ae
commit caafac0452
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 42 additions and 29 deletions

View File

@ -1428,6 +1428,13 @@ As of 2026-10-21, the milestone includes **829 merged pull requests**.
stalling other runs, requests and streams meanwhile. They now read the
config once per call in a worker, as image search already did. ([#7580])
- **wizard:** The setup wizard's Anthropic default model is now
`claude-sonnet-5-5` instead of the retired `claude-sonnet-4-20250514`, which
the Claude API no longer accepts. For that model the wizard leaves out the
extended-thinking (`budget_tokens`) and thinking-disabled templates it
rejects. The Anthropic examples in `config.example.yaml` and the
configuration docs follow the same model.([#7585])
- **auth:** The public auth routes (`/register`, `/setup-status`,
`/providers`, `/oauth/{provider}` and `/callback/{provider}`) no longer read
`config.yaml` and `extensions_config.json` on the event loop. Each request
@ -13177,5 +13184,6 @@ with **180 merged pull requests** since the first 2.0 milestone tag.
[#7560]: https://github.com/bytedance/deer-flow/pull/7560
[#7576]: https://github.com/bytedance/deer-flow/pull/7576
[#7580]: https://github.com/bytedance/deer-flow/pull/7580
[#7585]: https://github.com/bytedance/deer-flow/pull/7585
[#7588]: https://github.com/bytedance/deer-flow/pull/7588
[#7591]: https://github.com/bytedance/deer-flow/pull/7591

View File

@ -147,6 +147,20 @@ class TestProviders:
# Override must not mutate the shared provider-level config.
assert provider.extra_config["supports_vision"] is True
def test_anthropic_sonnet_5_5_omits_rejected_thinking_templates(self):
"""Sonnet 5.5 rejects budget_tokens and thinking disabled; other Claude models keep them."""
providers = {provider.name: provider for provider in LLM_PROVIDERS}
anthropic = providers["anthropic"]
assert anthropic.default_model == "claude-sonnet-5-5"
config = anthropic.extra_config_for("claude-sonnet-5-5")
assert "when_thinking_enabled" not in config
assert "when_thinking_disabled" not in config
assert anthropic.extra_config_for("claude-sonnet-4-5")["when_thinking_enabled"]["thinking"]["budget_tokens"] == 4096
# Omission must not mutate the shared provider-level config.
assert "when_thinking_enabled" in anthropic.extra_config
def test_extra_config_for_returns_provider_config_without_override(self):
"""Providers without per-model overrides return their config unchanged."""
providers = {provider.name: provider for provider in LLM_PROVIDERS}

View File

@ -396,29 +396,20 @@ models:
# for example on Docker Desktop:
# base_url: http://host.docker.internal:8080/v1
# Example: Anthropic Claude model (with extended thinking)
# supports_thinking: true is required — without it, DeerFlow silently falls
# back to non-thinking mode even when the UI thinking toggle is on.
# budget_tokens is required by the Anthropic API when thinking.type=enabled
# (no server default; min 1024; must be less than max_tokens).
# - name: claude-sonnet-4
# display_name: Claude Sonnet 4
# Example: Anthropic Claude model (thinks by default)
# Claude Sonnet 5.5 rejects extended thinking (budget_tokens), thinking
# type disabled, temperature, top_p and top_k, so leave them out.
# max_tokens covers both thinking and the answer.
# - name: claude-sonnet-5-5
# display_name: Claude Sonnet 5.5
# use: langchain_anthropic:ChatAnthropic
# model: claude-sonnet-4-20250514
# model: claude-sonnet-5-5
# api_key: $ANTHROPIC_API_KEY
# default_request_timeout: 600.0
# max_retries: 2
# max_tokens: 16000 # Per-call output cap
# max_tokens: 16000 # Per-call output cap (thinking + answer)
# context_window: 200000 # Total prompt + completion capacity
# supports_vision: true
# supports_thinking: true
# when_thinking_enabled:
# thinking:
# type: enabled
# budget_tokens: 4096 # required; min 1024; must be < max_tokens
# when_thinking_disabled:
# thinking:
# type: disabled
# Example: Google Gemini model (native SDK, no thinking support)
# - name: gemini-2.5-pro

View File

@ -48,21 +48,14 @@ models:
<Tabs.Tab>
```yaml
models:
- name: claude-3-5-sonnet
- name: claude-sonnet-5-5
use: langchain_anthropic:ChatAnthropic
model: claude-3-5-sonnet-20241022
model: claude-sonnet-5-5
api_key: $ANTHROPIC_API_KEY
default_request_timeout: 600.0
max_retries: 2
max_tokens: 8192
supports_vision: true
supports_thinking: true
when_thinking_enabled:
thinking:
type: enabled
when_thinking_disabled:
thinking:
type: disabled
```
</Tabs.Tab>
<Tabs.Tab>

View File

@ -23,6 +23,9 @@ class LLMProvider:
# capability (e.g. MiniMax M3 supports vision but M2.7 is text-only). The
# provider-level extra_config holds the default (default_model) capability.
model_vision_overrides: dict[str, bool] = field(default_factory=dict)
# Per-model extra_config keys to leave out for models whose API rejects
# them (e.g. Claude Sonnet 5.5 rejects budget_tokens and thinking disabled).
model_omitted_config: dict[str, tuple[str, ...]] = field(default_factory=dict)
auth_hint: str | None = None
base_url_prompt: str | None = None
model_prompt: str | None = None
@ -38,6 +41,8 @@ class LLMProvider:
config = dict(self.extra_config)
if model_name in self.model_vision_overrides:
config["supports_vision"] = self.model_vision_overrides[model_name]
for key in self.model_omitted_config.get(model_name, ()):
config.pop(key, None)
return config
@ -256,10 +261,10 @@ LLM_PROVIDERS: list[LLMProvider] = [
LLMProvider(
name="anthropic",
display_name="Anthropic",
description="Claude Sonnet 4 with extended thinking",
description="Claude Sonnet 5.5 with thinking",
use="langchain_anthropic:ChatAnthropic",
models=["claude-sonnet-4-20250514", "claude-opus-4-5", "claude-sonnet-4-5"],
default_model="claude-sonnet-4-20250514",
models=["claude-sonnet-5-5", "claude-opus-4-5", "claude-sonnet-4-5"],
default_model="claude-sonnet-5-5",
env_var="ANTHROPIC_API_KEY",
package="langchain-anthropic",
extra_config={
@ -269,6 +274,8 @@ LLM_PROVIDERS: list[LLMProvider] = [
"supports_vision": True,
**ANTHROPIC_THINKING_CONFIG,
},
# Sonnet 5.5 thinks by default and rejects budget_tokens and thinking disabled.
model_omitted_config={"claude-sonnet-5-5": ("when_thinking_enabled", "when_thinking_disabled")},
),
LLMProvider(
name="deepseek",