From aebc7850f40c6957fca4dbccd46c26a6414d538b Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 6 Feb 2025 15:25:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20openrouter=20=E6=8A=A5=E9=94=99=20no=20e?= =?UTF-8?q?ndpoints=20found=20that=20support=20tool=20use=20#371?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/provider/sources/openai_source.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/astrbot/core/provider/sources/openai_source.py b/astrbot/core/provider/sources/openai_source.py index c4c7c809b..b2d0c157c 100644 --- a/astrbot/core/provider/sources/openai_source.py +++ b/astrbot/core/provider/sources/openai_source.py @@ -164,7 +164,8 @@ class ProviderOpenAIOfficial(Provider): or 'does not support tools' in str(e) \ or 'Function call is not supported' in str(e) \ or 'Function calling is not enabled' in str(e) \ - or 'Tool calling is not supported' in str(e): # siliconcloud + or 'Tool calling is not supported' in str(e) \ + or 'No endpoints found that support tool use' in str(e): # siliconcloud logger.info(f"{self.get_model()} 不支持函数工具调用,已自动去除,不影响使用。") if 'tools' in payloads: del payloads['tools']