From 4cb2a22400c4087bd098c2f46dcb8557888f7eb5 Mon Sep 17 00:00:00 2001 From: john lee <64lamei@gmail.com> Date: Thu, 21 May 2026 21:13:24 +0800 Subject: [PATCH] =?UTF-8?q?docs(config.example):=20fix=20Claude=20thinking?= =?UTF-8?q?=20example=20=E2=80=94=20add=20supports=5Fthinking=20and=20budg?= =?UTF-8?q?et=5Ftokens=20(#3068)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The commented Claude example used Claude 3.5 Sonnet with when_thinking_enabled but lacked supports_thinking: true. Copying the block and swapping to a Claude 4 model name would silently fall back to non-thinking mode (agent.py line 380 suppresses the error and logs only a warning). A second trap: budget_tokens is required by the Anthropic API when thinking.type == "enabled"; there is no server default. The old example omitted it, so any user who did add supports_thinking: true would get an API error on the first thinking request. Replace with a Claude Sonnet 4 example that includes both fields and inline comments explaining the constraints. Closes #2336 Co-authored-by: Claude Sonnet 4.6 --- config.example.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/config.example.yaml b/config.example.yaml index 7396f6cfb..9ea4e4c08 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -118,19 +118,25 @@ models: # For Docker deployments, use host.docker.internal instead of localhost: # base_url: http://host.docker.internal:11434 - # Example: Anthropic Claude model - # - name: claude-3-5-sonnet - # display_name: Claude 3.5 Sonnet + # 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 # use: langchain_anthropic:ChatAnthropic - # model: claude-3-5-sonnet-20241022 + # model: claude-sonnet-4-20250514 # api_key: $ANTHROPIC_API_KEY # default_request_timeout: 600.0 # max_retries: 2 - # max_tokens: 8192 - # supports_vision: true # Enable vision support for view_image tool + # max_tokens: 16000 + # 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