update:优化空密钥的提示提示方式

This commit is contained in:
hrz
2025-06-12 23:11:42 +08:00
parent 3e8246ac41
commit 0fc8f02c6e
14 changed files with 96 additions and 52 deletions
@@ -73,8 +73,9 @@ class LLMProvider(LLMProviderBase):
http_proxy = cfg.get("http_proxy")
https_proxy = cfg.get("https_proxy")
if not check_model_key("LLM", self.api_key):
raise ValueError("无效的Gemini API Key,请检查是否配置正确")
model_key_msg = check_model_key("LLM", self.api_key)
if model_key_msg:
log.bind(tag=TAG).error(model_key_msg)
if http_proxy or https_proxy:
log.bind(tag=TAG).info(