From 469f4984282fa44847c3f4e5680ba01d682aa7b9 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Thu, 16 Apr 2026 14:51:36 +0800 Subject: [PATCH] fix: increase anthropic default max tokens (#7593) --- astrbot/core/provider/sources/anthropic_source.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astrbot/core/provider/sources/anthropic_source.py b/astrbot/core/provider/sources/anthropic_source.py index 83f2e16db..764457759 100644 --- a/astrbot/core/provider/sources/anthropic_source.py +++ b/astrbot/core/provider/sources/anthropic_source.py @@ -293,7 +293,7 @@ class ProviderAnthropic(Provider): extra_body = self.provider_config.get("custom_extra_body", {}) if "max_tokens" not in payloads: - payloads["max_tokens"] = 1024 + payloads["max_tokens"] = 65536 self._apply_thinking_config(payloads) try: @@ -389,7 +389,7 @@ class ProviderAnthropic(Provider): reasoning_signature = "" if "max_tokens" not in payloads: - payloads["max_tokens"] = 1024 + payloads["max_tokens"] = 65536 self._apply_thinking_config(payloads) async with self.client.messages.stream(