Skip to content
Discussion options

You must be logged in to vote

你遇到的 400 错误,是因为 vLLM 部署的 Qwen3 模型在 Lobe Chat 配置中被标记为支持 function/tool call(即 abilities.functionCall: true),导致启用 MCP 工具时请求体会自动带上 tools、functions 等参数,但 vLLM 上的 Qwen3 实际并不支持这些参数,从而直接返回 400 错误。单独用 vLLM 或 OpenAI+MCP 没问题,是因为只有 vLLM+Qwen3+MCP 这个组合才会触发这个兼容性问题。

解决方法有两种:

  1. 临时规避:在 Qwen3 模型使用场景下,禁用 MCP 工具或相关插件,避免请求体带上 tools 字段。
  2. 根本修复:在 Lobe Chat 的模型配置(如 src/config/aiModels/qwen.ts 或 vLLM provider 逻辑)中,将 Qwen3 相关模型的 abilities.functionCall 设置为 false,这样前端就不会再给 vLLM Qwen3 发送 tools/function call 相关参数,能彻底避免 400 错误。这个调整只影响 vLLM 下的 Qwen3,不影响其他支持工具调用的模型和 provider。相关代码参考 配置原理说明

如果你需要临时绕过,可以手动确保 payload.tools 不被设置或为 false(比如在 MCP 插件配置或调用时规避工具调用)。如果需要彻底解决,建议调整模型配置,后续升级时也能避免类似问题。

相关讨论和 workaround 也可以参考 issue 7637

T…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by arvinxx
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirm Not yet confirmed by maintainers
3 participants
Converted from issue

This discussion was converted from issue #8375 on October 13, 2025 13:29.