[v4.10.7] - 被禁言避免触发分析功能浪费 token,重构并优化模型请求的重试与降级补偿机制

This commit is contained in:
SXP-Simon
2026-07-10 15:34:13 +08:00
parent 24db140382
commit 3979a30787
6 changed files with 32 additions and 9 deletions
+15
View File
@@ -0,0 +1,15 @@
### Demo preview images — not needed at runtime, kept in repo for reference/docs
assets/*.jpg export-ignore
assets/*.png export-ignore
### CI/CD workflow files — not needed in production plugin zip
.github/ export-ignore
### Documentation — design docs, not needed at runtime
docs/ export-ignore
### Scripts — release utilities, not needed by end users
scripts/ export-ignore
### Test directory — not needed in production
tests/ export-ignore
+8 -4
View File
@@ -1,15 +1,19 @@
# 更新日志 (CHANGELOG)
## [v4.10.6] - ✨ 支持 [SnowLuma](https://github.com/SnowLuma/SnowLuma) ,优化 HatsuneMiku 移动端适配情况
* **✨ 支持 SnowLuma**: 自动探测是否为 SnowLuma;支持 SnowLuma 的 get_group_msg_history 参数传递情况 (#189 @tryptophawa)
* **🛠️ HatsuneMiku 优化**: 优化了移动端直接使用浏览器打开 HTML 时的 UI 排版情况 (#184 @Shiitin)
## [v4.10.7] - ✨ 被禁言避免触发分析功能浪费 token,重构并优化模型请求的重试与降级补偿机制
* **✨ 支持禁言跳过**: 被禁言避免触发分析功能浪费 token (#191)
* **✨ 模型请求优化**: 重构并优化模型请求的重试与降级补偿机制 (@Rat0323)
---
<details>
<summary>📋 点击查看历史更新日志</summary>
## [v4.10.6] - ✨ 支持 [SnowLuma](https://github.com/SnowLuma/SnowLuma) ,优化 HatsuneMiku 移动端适配情况
* **✨ 支持 SnowLuma**: 自动探测是否为 SnowLuma;支持 SnowLuma 的 get_group_msg_history 参数传递情况 (#189 @tryptophawa)。
* **🛠️ HatsuneMiku 优化**: 优化了移动端直接使用浏览器打开 HTML 时的 UI 排版情况 (#184 @Shiitin)
## [v4.10.5] - ✨ 支持可选流式 LLM 调用 (#181 @anchorAnc)
## [v4.10.4] - 🛠️ 将镜像地址配置注入到子模板渲染上下文中,解决 ATRI 子模板中变量未定义导致的生成问题
+1 -1
View File
@@ -2,7 +2,7 @@
# 群聊日常分析插件
[![Plugin Version](https://img.shields.io/badge/Latest_Version-v4.10.6-blue.svg?style=for-the-badge&color=76bad9)](https://github.com/SXP-Simon/astrbot-qq-group-daily-analysis)
[![Plugin Version](https://img.shields.io/badge/Latest_Version-v4.10.7-blue.svg?style=for-the-badge&color=76bad9)](https://github.com/SXP-Simon/astrbot-qq-group-daily-analysis)
[![AstrBot](https://img.shields.io/badge/AstrBot-Plugin-ff69b4?style=for-the-badge)](https://github.com/AstrBotDevs/AstrBot)
[![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](LICENSE)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/SXP-Simon/astrbot_plugin_qq_group_daily_analysis)
+1 -1
View File
@@ -1,7 +1,7 @@
name: astrbot_plugin_qq_group_daily_analysis # 这是你的插件的唯一识别名。
display_name: 群分析总结插件 # 插件的显示名称
desc: "[多平台接入开发中] 群日常分析总结插件 - 支持 QQ (aiocqhttp)、Telegram、Discord 以及 Feishu (Lark);生成精美的群聊分析报告,支持话题分析、用户形象、群聊圣经等功能" # 插件简短描述
version: v4.10.6 # 插件版本号。格式:v1.1.1 或者 v1.1
version: v4.10.7 # 插件版本号。格式:v1.1.1 或者 v1.1
author: SXP-Simon # 作者
astrbot_version: ">=4.16.0"
support_platforms:
@@ -376,11 +376,13 @@ async def call_provider_with_retry(
fallback_provider_id = await get_provider_id_with_fallback(
context, config_manager, None, umo
)
if fallback_provider_id and fallback_provider_id != specific_provider_id:
if (
fallback_provider_id
and fallback_provider_id != specific_provider_id
):
for _ in range(retries):
attempt_queue.append((fallback_provider_id, True))
is_last_attempt = i == len(attempt_queue) - 1
if not is_last_attempt:
# Exponential backoff with jitter: backoff * (2 ^ (attempt_num - 1)) + random jitter
@@ -1008,7 +1008,9 @@ class OneBotAdapter(PlatformAdapter):
if not e:
return False
err_str = str(e)
if "1200" in err_str and ("禁言" in err_str or "操作失败" in err_str or "下游群鉴权" in err_str):
if "1200" in err_str and (
"禁言" in err_str or "操作失败" in err_str or "下游群鉴权" in err_str
):
return True
err_msg = getattr(e, "message", "") or ""
err_word = getattr(e, "wording", "") or ""