NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Bug] 使用 deepseek-reasoner(DeepSeek) 模型,输出了无关的 Tool Call 信息。

Open talentestors opened this issue 9 months ago • 3 comments

📦 部署方式

Vercel

📌 软件版本

commit/b6f5d756567c79cb15adb2f31a0399ed868668ef

💻 系统环境

Windows

📌 系统版本

11

🌐 浏览器

Chrome

📌 浏览器版本

134.0.6998.89

🐛 问题描述

使用 deepseek-reasoner(DeepSeek) 模型,输出了无关的信息。

Image

{
  "method": "tools/call",
  "params": {
    "name": "write_file",
    "arguments": {
      "path": "/Users/river/dev/nextchat/test/git-bundle-guide.md",
      "content": "# Git Bundle 完整指南\n\n## 核心功能\n✅ 离线仓库传输\n✅ 增量备份\n✅ 版本快照\n\n## 基础用法\n```bash\n# 创建全量备份\n git bundle create repo.bundle --all\n\n# 验证有效性\n git bundle verify repo.bundle\n\n# 克隆离线仓库\n git clone repo.bundle new-repo --mirror\n```\n\n## 高级技巧\n🔥 增量备份\n```bash\n# 首次全量备份\ngit bundle create v1.bundle HEAD main\n\n# 后续增量备份\ngit bundle create v2.bundle HEAD main ^v1.bundle\n```\n\n## 关键参数\n- `--all` 包含所有分支和标签\n- `--progress` 显示打包进度\n- `--version=<n>` 指定格式版本\n\n## 典型应用场景\n1. 安全备份关键提交\n2. 无网络环境代码同步\n3. 大型仓库分段传输\n\n## 注意事项\n⚠️ 每次验证 bundle 完整性\n⚠️ 增量备份需保留前序 bundle\n⚠️ 使用后执行 `git clean -fd` 清理临时文件"
    }
  }
}
{
  "result": {
    "success": true,
    "message": "文件已写入 /Users/river/dev/nextchat/test/git-bundle-guide.md"
  }
}

📷 复现步骤

(需要在 Vercel 中设置变量 ENABLE_MCP=true

开启deepseek-reasoner(DeepSeek) 模型(官方API)

🚦 期望结果

设置 MCP 不应该在对话中显示相关内容。

📝 补充信息

update issue:

怀疑是因为设置了 MCP ENABLE_MCP=true 变量。

移除 MCP 变量后,重新部署经过测试后问题不再复现。

talentestors avatar Mar 15 '25 14:03 talentestors

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] Use the deepseek-reasoner(DeepSeek) model to output irrelevant system information.

Issues-translate-bot avatar Mar 15 '25 14:03 Issues-translate-bot

使用其他模型(例如本地部署的 Qwen2.5-14B-Instruct)也出现了类似的问题:开启MCP后回答中莫名其妙出现了tool call

QwertyJack avatar Mar 22 '25 11:03 QwertyJack

Bot detected the issue body's language is not English, translate it automatically.


A similar problem occurred with other models (such as locally deployed Qwen2.5-14B-Instruct): tool call inexplicably appeared in the answer after opening MCP.

Issues-translate-bot avatar Mar 22 '25 11:03 Issues-translate-bot

I'm very interested in this issue.

After reviewing the code:

  1. Through app.store.chat.checkMcpJson, the mcp information is extracted from the assistant's response, and after executing the mcp tool, onUserInput is constructed and returned to the LLM.
  2. In app.components.chat.Fragment, the rendering logic is determined solely by isUser, and it only supports rendering for assistant and user.

My initial thoughts are: To define a MCPToolCard to hold the mcp tool information and mcp response; and add an isMcpTool to handle the rendering logic.

Edison-A-N avatar Apr 28 '25 00:04 Edison-A-N

Regarding issue #5909, it appears that the implementation in PR #5974 does not include support for the list_tools function or enable users to call the call_tool

Edison-A-N avatar Apr 28 '25 01:04 Edison-A-N