Skip to content

[Bug] 图片压缩无效,当遇到大于2048*2048的图时会无法处理 #7791

@yujianke100

Description

@yujianke100

What happened / 发生了什么

当给机器人发送一张大图后,机器人无法进行压缩,导致出现超过最大可处理图的报错

Reproduce / 如何复现?

给机器人传一张大图就能触发

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

v4.23.5 docker

OS

Linux

Logs / 报错日志

[2026-04-25 18:09:15.632] [Core] [ERRO] [v4.23.5] [core.astr_main_agent:571]: 处理图片描述失败: Error code: 400 - {'error': {'message': 'input size exceed limit 2048x2048,current input:(1900,2532)', 'request_id': '4bd1f931-0795-45a8-be62-9ee4f988a0fd'}}

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreThe bug / feature is about astrbot's core, backendbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions