Skip to content

[Bug] 获取模型后测试模型报错400 #4245

@aiterxs110-commits

Description

@aiterxs110-commits

What happened / 发生了什么

任意一个服务商,如果只选择基础语言模型是可以正常测试通过的,但如果选择有image这种可以生成图片的模型就会400报错,经过多次测试3个服务商接口,语言模型都没问题,具备生图功能的均400,这个该怎么解决

Reproduce / 如何复现?

  1. 打开Astrbot面板
  2. 打开模型提供商
  3. 选择Xai服务商
  4. 选择grok-2-image-1212模型
  5. 测试该模型400报错
  6. 选择其他模型(测试正常)
  7. 选择其他服务商的可生图模型均为400报错

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

v4.10.2 linux服务器部署

OS

Linux

Logs / 报错日志

[10:50:46] [Core] [WARN] [routes.config:512]: Provider xai/grok-2-image-1212 (ID: xai/grok-2-image-1212) is unavailable. Error: Error code: 400 - {'code': 'Client specified an invalid argument', 'error': 'The model grok-2-image-1212 is an image model and is therefore not available on this endpoint. Please use a compatible endpoint such as https://api.x.ai/v1/images/generations. For more information, see https://docs.x.ai/docs/api-reference#image-generations'}

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

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:providerThe bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner.bugSomething isn't workingpriority: p0will fix asap

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions