From b493a808fe2cd59741dcb6a3d0f4346ff2a1c762 Mon Sep 17 00:00:00 2001 From: Raven95676 Date: Fri, 11 Apr 2025 20:25:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E6=80=81=E4=B8=8D=E6=94=AF=E6=8C=81=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/provider/sources/gemini_source.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/astrbot/core/provider/sources/gemini_source.py b/astrbot/core/provider/sources/gemini_source.py index 50f4018ee..1447b9e2c 100644 --- a/astrbot/core/provider/sources/gemini_source.py +++ b/astrbot/core/provider/sources/gemini_source.py @@ -227,7 +227,11 @@ class ProviderGoogleGenAI(Provider): elif "Function calling is not enabled" in error_msg: logger.warning(f"{self.get_model()} 不支持函数调用,已自动去除") tool_list = None - elif "Multi-modal output is not supported" in error_msg: + elif ( + "Multi-modal output is not supported" + or "Model does not support the requested response modalities" + in error_msg + ): logger.warning( f"{self.get_model()} 不支持多模态输出,降级为文本模态" )