#10092·AstrBot

[Bug] QQ Base64 [(记忆:++++]

作者: MostimaBridges创建于 2026年9月15日更新于 2026年9月15日

在:

页:1 LLM : 所有聊天模式失败 : 内存错误 :


校对:Soup

页:1
[2026-09-15 10:29:56.833] [Core][ERRO][v4.28.1] [agent sub stages. 内部:541]:处理代理时出错:

对用户可见的两条报错文本分别是:

页:1 LLM : 所有聊天模式失败: 内存错误 : 处理代理请求时发生错误 :


" 记忆 " / " 记忆 " / " AstrBot " / " (不是服务商返回的)、 " (说明进程内存被耗尽。而**发送纯文本也会失败**这一事实说明问题不在当前消息)、 " (而在每轮都要重建的会话历史。)、 " (而在每轮都要重建的会话历史。)

{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}=================================================================================================================================================================================

=============================================================================== (========================================================================================================================================================= (== (==================

`astrbot/core/agent/context/token counter.py:34':

``` ZZ
IMAGE TOKEN ESTIMATE = 765 (中文(简体) ).

Estimate TokenCounter.count tokens () ' ImageurLPart ' :

[Python] lif 存在( 部分, ImageURL 部分) : 总计 . IMAGE TOKEN ESTIMATE


+ 3 KB + 30 MB + , token + + , + + .

#### 2.

`astrbot/core/config/agent runner.py:114':

```2ZZ
max turns = 压缩  config.get ("max turns", -1).

`astrbot/core/agent/context/manager.py:60':

# 1. (执行最大转弯)
(原始内容存档于2018-09-21). if self.config.enforce max turns!= -1:
結果 =自.truncator.truncate by turns(.

`-1 ' (不限制), 该整段被跳过。于是两道限制同时失效: 轮数不裁剪, token 压缩又看不见图片体积。

  1. 基数64

astrbot/core/提供商/实体.py:192' CHA Provider request.assemble context ()' 把图片引用内联为 Base64 数据 URI:

4zz
# 3. 读取图像参考,不重定大小或转码.
. . . . . . . .
映像 data = 等待解析 image ref to base64 data(映像 url)
内容 块. append ()
{'type':"image url","image url":{"url":image data.to data url()}##,
(中文(简体) ).

数据 URI :

zz
# 在事件清理前抓取字节。 其它图像路径也必须
# 联系到提供者,并坚持作为可移植数据URI的历史.

astrbot/core/ agent/runners/tool loop agent runner.py:339/344/351 ' ,dump messages with check points(所有 messages)'-;`astrbot/core/astr main agent.py:1358'-:

6zz
req.contexts = json.loads (req.conconversation. history) (英语).

4. 放大效应

==============================================================================================================================================================================================================

5. 加重问题的几处实现

  • 工具 loop agent runner.py:625' 使用:除例外' 捕获异常后:继续',会对同一份超大:有效载荷 依次尝试全部:后退提供者;最终在::642' 抛出:所有聊天模式都失败了:{类型}:{e}。:}
  • `代理人 子级/内部.py:541':
7zz
logger.error (f) 处理代理时发生错误 : {e}"

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

  • **WebUI ' astrbot/dashboard/ services/ conversion-service.py:143 ' et conversation-detail() ' conversation.history',-;-astrbot/dashboard/api/app.py:178 ' ,-`内部服务器出错'-
  • ** 磁盘 . . . . . . .

内容来源: AstrBotDevs/AstrBot