mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-09-09 01:46:38 +08:00
新增API密钥切换日志,记录密钥切换信息
This commit is contained in:
@@ -230,6 +230,7 @@ class ChatService:
|
|||||||
logger.warning(f"Stream error: {str(e)}, attempting retry {retries + 1}")
|
logger.warning(f"Stream error: {str(e)}, attempting retry {retries + 1}")
|
||||||
if retries < MAX_RETRIES - 1:
|
if retries < MAX_RETRIES - 1:
|
||||||
current_api_key = await self.key_manager.handle_api_failure(current_api_key)
|
current_api_key = await self.key_manager.handle_api_failure(current_api_key)
|
||||||
|
logger.info(f"Switched to new API key: {current_api_key}")
|
||||||
retries += 1
|
retries += 1
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user