Skip to content

[Bug] 获取模型列表后添加模型测试连接失败 #7863

@ACAne0320

Description

@ACAne0320

What happened / 发生了什么

在 AstrBot WebUI 的供应商模型管理页面中,我选择了一个 OpenAI Compatible 供应商源,填写有效的 API KeyAPI Base URL 后,可以正常获取模型列表。

获取到模型后,我添加/启用了其中一个模型,然后立刻点击该模型旁边的测试按钮。此时测试失败,后端日志提示该 provider 不存在于 provider_manager 中。

但如果我先打开这个模型的配置页,并点击一次保存,再点击测试,就可以正常通过。
[14:02:35.463] [Core] [INFO] [routes.config:743]: API call: /config/provider/check_one id=MIMO Plan/mimo-v2-omni
[14:02:36.826] [Core] [INFO] [routes.config:706]: Provider MIMO Plan/mimo-v2-omni (ID: MIMO Plan/mimo-v2-omni) is available.

Reproduce / 如何复现?

  1. 添加或选择一个 OpenAI Compatible 供应商源。
  2. 填写有效的 API KeyAPI Base URL
  3. 点击获取模型,确认可以正常返回模型列表。
  4. 添加其中一个模型到“已配置的模型”列表。
  5. 该模型初始状态为关闭。
  6. 点击开关启用该模型。
  7. 不打开模型配置页,也不点击配置页里的保存按钮。
  8. 直接点击该模型旁边的测试按钮。

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

AstrBot CLI version: 4.23.6
部署方式: uv tool
提供商: OpenAI Compatible

OS

Linux

Logs / 报错日志

[14:00:06.161] [Core] [INFO] [routes.config:743]: API call: /config/provider/check_one id=MIMO Plan/mimo-v2-omni
[14:00:06.161] [Core] [WARN] [v4.23.6] [routes.config:749]: Provider with id 'MIMO Plan/mimo-v2-omni' not found in provider_manager.

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 working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions