Skip to content

[Bug]更新新版4.21后用大模型一直会报'int' and 'NoneType',导致无法正常使用 #6772

Closed

Description

@alicia1030su

What happened / 发生了什么

更新后和机器人聊天就会报'int' and 'NoneType',然后报400,导致无法正常使用

Image

Reproduce / 如何复现?

1.更新4.21
2.和任意机器人聊天

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

4.21
window.exe

OS

Windows

Logs / 报错日志

[2026-03-22 10:17:54.105] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:283]: Chat Model 自建api/qwen3.5-plus request error: unsupported operand type(s) for -: 'int' and 'NoneType'
Traceback (most recent call last):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 258, in _iter_llm_responses_with_fallback
async for resp in self._iter_llm_responses(include_model=idx == 0):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 235, in _iter_llm_responses
yield await self.provider.text_chat(**payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 790, in text_chat
) = await self._handle_api_error(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 741, in _handle_api_error
raise e
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 778, in text_chat
llm_response = await self._query(payloads, func_tool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 285, in _query
llm_response = await self._parse_openai_completion(completion, tools)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 571, in _parse_openai_completion
llm_response.usage = self._extract_usage(completion.usage)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 396, in _extract_usage
input_other=prompt_tokens - cached,
~~~~~~~~~~~~~~^~~~~~~~
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'
[2026-03-22 10:17:54.166] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:250]: Switched from 自建api/qwen3.5-plus to fallback chat provider: 自建api/doubao-seed-2-0-pro-260215
[2026-03-22 10:17:56.170] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:283]: Chat Model 自建api/doubao-seed-2-0-pro-260215 request error: Error code: 400 - {'error': {'message': 'Total tokens of image and text exceed max message tokens. Request id: 021774145881399e3c0010419774ef230e4bef6206f9366989f55', 'type': 'BadRequest', 'param': '', 'code': 'InvalidParameter'}}
Traceback (most recent call last):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 258, in _iter_llm_responses_with_fallback
async for resp in self._iter_llm_responses(include_model=idx == 0):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 235, in _iter_llm_responses
yield await self.provider.text_chat(**payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 790, in text_chat
) = await self._handle_api_error(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 741, in _handle_api_error
raise e
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 778, in text_chat
llm_response = await self._query(payloads, func_tool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 272, in _query
completion = await self.client.chat.completions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai\resources\chat\completions\completions.py", line 2714, in create
return await self._post(
^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai_base_client.py", line 1884, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai_base_client.py", line 1669, in request
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': 'Total tokens of image and text exceed max message tokens. Request id: 021774145881399e3c0010419774ef230e4bef6206f9366989f55', 'type': 'BadRequest', 'param': '', 'code': 'InvalidParameter'}}
[2026-03-22 10:17:56.246] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:250]: Switched from 自建api/doubao-seed-2-0-pro-260215 to fallback chat provider: 自建api/腾讯kimi-k2.5
[2026-03-22 10:17:57.906] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:283]: Chat Model 自建api/腾讯kimi-k2.5 request error: Error code: 400 - {'error': {'message': 'Request parameters are invalid. Please check the required parameters.', 'type': 'runtime_error', 'param': '', 'code': '20024'}}
Traceback (most recent call last):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 258, in _iter_llm_responses_with_fallback
async for resp in self._iter_llm_responses(include_model=idx == 0):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 235, in _iter_llm_responses
yield await self.provider.text_chat(**payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 790, in text_chat
) = await self._handle_api_error(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 741, in _handle_api_error
raise e
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 778, in text_chat
llm_response = await self._query(payloads, func_tool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 272, in _query
completion = await self.client.chat.completions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai\resources\chat\completions\completions.py", line 2714, in create
return await self._post(
^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai_base_client.py", line 1884, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai_base_client.py", line 1669, in request
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': 'Request parameters are invalid. Please check the required parameters.', 'type': 'runtime_error', 'param': '', 'code': '20024'}}
[2026-03-22 10:17:57.978] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:250]: Switched from 自建api/腾讯kimi-k2.5 to fallback chat provider: 自建api/qianfan-code-latest
[2026-03-22 10:17:59.495] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:283]: Chat Model 自建api/qianfan-code-latest request error: Error code: 400 - {'error': {'message': "Error code: 400 - {'error': {'code': 'invalid_argument', 'message': 'Message format error, index[2] tool_calls[3] id is duplicate', 'type': 'invalid_request_error'}, 'id': 'as-ztpi8cz5g8'}", 'type': 'api_error', 'param': '', 'code': None}}
Traceback (most recent call last):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 258, in _iter_llm_responses_with_fallback
async for resp in self._iter_llm_responses(include_model=idx == 0):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 235, in _iter_llm_responses
yield await self.provider.text_chat(**payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 790, in text_chat
) = await self._handle_api_error(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 741, in _handle_api_error
raise e
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 778, in text_chat
llm_response = await self._query(payloads, func_tool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 272, in _query
completion = await self.client.chat.completions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai\resources\chat\completions\completions.py", line 2714, in create
return await self._post(
^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai_base_client.py", line 1884, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai_base_client.py", line 1669, in request
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': "Error code: 400 - {'error': {'code': 'invalid_argument', 'message': 'Message format error, index[2] tool_calls[3] id is duplicate', 'type': 'invalid_request_error'}, 'id': 'as-ztpi8cz5g8'}", 'type': 'api_error', 'param': '', 'code': None}}
[2026-03-22 10:17:59.569] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:250]: Switched from 自建api/qianfan-code-latest to fallback chat provider: 自建api/grok-4.20-beta
[2026-03-22 10:17:59.945] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:283]: Chat Model 自建api/grok-4.20-beta request error: Error code: 403 - {'error': {'code': '', 'message': 'This token has no access to model grok-4.20-beta (request id: 20260322021806532583044vrL7h0r8)', 'type': 'new_api_error'}}
Traceback (most recent call last):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 258, in _iter_llm_responses_with_fallback
async for resp in self._iter_llm_responses(include_model=idx == 0):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 235, in _iter_llm_responses
yield await self.provider.text_chat(**payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 790, in text_chat
) = await self._handle_api_error(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 741, in _handle_api_error
raise e
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 778, in text_chat
llm_response = await self._query(payloads, func_tool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 272, in _query
completion = await self.client.chat.completions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai\resources\chat\completions\completions.py", line 2714, in create
return await self._post(
^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai_base_client.py", line 1884, in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\venv\Lib\site-packages\openai_base_client.py", line 1669, in request
raise self._make_status_error_from_response(err.response) from None
openai.PermissionDeniedError: Error code: 403 - {'error': {'code': '', 'message': 'This token has no access to model grok-4.20-beta (request id: 20260322021806532583044vrL7h0r8)', 'type': 'new_api_error'}}
[2026-03-22 10:18:00.014] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:250]: Switched from 自建api/grok-4.20-beta to fallback chat provider: 魔塔社区API/ZhipuAI/GLM-5
[2026-03-22 10:18:02.440] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:283]: Chat Model 魔塔社区API/ZhipuAI/GLM-5 request error: API 返回的 completion 为空。
Traceback (most recent call last):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 258, in _iter_llm_responses_with_fallback
async for resp in self._iter_llm_responses(include_model=idx == 0):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\agent\runners\tool_loop_agent_runner.py", line 235, in _iter_llm_responses
yield await self.provider.text_chat(**payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 790, in text_chat
) = await self._handle_api_error(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 741, in _handle_api_error
raise e
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 778, in text_chat
llm_response = await self._query(payloads, func_tool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 285, in _query
llm_response = await self._parse_openai_completion(completion, tools)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\core\provider\sources\openai_source.py", line 498, in _parse_openai_completion
raise Exception("API 返回的 completion 为空。")
Exception: API 返回的 completion 为空。

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

  • Yes!

Code of Conduct

Activity

  1. added
    area:providerThe bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner.
    on Mar 22, 2026
  2. WaterGodFurina commented on Mar 22, 2026

    @WaterGodFurina

    我的好像不会欸,至少Gemini 3 flash和kimi 2.5没出现过

  3. alicia1030su commented on Mar 22, 2026

    @alicia1030su
    Author

    我的好像不会欸,至少Gemini 3 flash和kimi 2.5没出现过

    我的qwen3.5 plus一直报

  4. alicia1030su commented on Mar 22, 2026

    @alicia1030su
    Author

    我的好像不会欸,至少Gemini 3 flash和kimi 2.5没出现过

    Image
  5. miiifeng commented on Mar 22, 2026

    @miiifeng

    小米mimo-omni也会报:
    [2026-03-22 11:58:00.505] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:283]: Chat Model xiaomi/mimo-v2-omni request error: Error code: 400 - {'error': {'code': '400', 'message': 'Param Incorrect', 'param': 'messages[3] assistant content must contain at least one part', 'type': ''}}
    Traceback (most recent call last):
    File "/AstrBot/astrbot/core/agent/runners/tool_loop_agent_runner.py", line 258, in _iter_llm_responses_with_fallback
    async for resp in self._iter_llm_responses(include_model=idx == 0):
    File "/AstrBot/astrbot/core/agent/runners/tool_loop_agent_runner.py", line 235, in _iter_llm_responses
    yield await self.provider.text_chat(**payload)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/AstrBot/astrbot/core/provider/sources/openai_source.py", line 790, in text_chat
    ) = await self._handle_api_error(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/AstrBot/astrbot/core/provider/sources/openai_source.py", line 741, in _handle_api_error
    raise e
    File "/AstrBot/astrbot/core/provider/sources/openai_source.py", line 778, in text_chat
    llm_response = await self._query(payloads, func_tool)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/AstrBot/astrbot/core/provider/sources/openai_source.py", line 272, in _query
    completion = await self.client.chat.completions.create(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/openai/resources/chat/completions/completions.py", line 2714, in create
    return await self._post(
    ^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/openai/_base_client.py", line 1884, in post
    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/openai/_base_client.py", line 1669, in request
    raise self._make_status_error_from_response(err.response) from None
    openai.BadRequestError: Error code: 400 - {'error': {'code': '400', 'message': 'Param Incorrect', 'param': 'messages[3] assistant content must contain at least one part', 'type': ''}}
    [2026-03-22 11:58:00.510] [Core] [WARN] [v4.21.0] [runners.tool_loop_agent_runner:250]: Switched from xiaomi/mimo-v2-omni to fallback chat provider: tencent/glm-5

    回退到glm-5后正常

  6. added a commit that references this issue on Mar 22, 2026
    db46a37
  7. added a commit that references this issue on Mar 22, 2026
    63dd28d
  8. added a commit that references this issue on Mar 28, 2026
    ae67d1e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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: p0

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions