From a7e9a7f30cf4f349732526f872a55ff9a34f329f Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 20 Nov 2025 23:30:19 +0800 Subject: [PATCH] fix(gemini): ensure extra_content is not empty before processing --- astrbot/core/provider/sources/gemini_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrbot/core/provider/sources/gemini_source.py b/astrbot/core/provider/sources/gemini_source.py index e14140d43..fec1fb802 100644 --- a/astrbot/core/provider/sources/gemini_source.py +++ b/astrbot/core/provider/sources/gemini_source.py @@ -299,7 +299,7 @@ class ProviderGoogleGenAI(Provider): # we should set thought_signature back to part if exists # for more info about thought_signature, see: # https://ai.google.dev/gemini-api/docs/thought-signatures - if "extra_content" in tool: + if "extra_content" in tool and tool["extra_content"]: ts_bs64 = ( tool["extra_content"] .get("google", {})