Uersx / dsh-dashscope-tool-adapter

已收录

dsh-dashscope-tool-adapter

master工具技能 查看源代码

安装

npx -y @deepseek-ai/dsh plugin --profile web add github:Uersx/dsh-dashscope-tool-adapter

此安装命令根据 GitHub 仓库地址生成,是未经验证的安装起点。

README

维护者编写的文档快照。

在 GitHub 查看 ↗
提交版本 122223a同步于 2026年8月18日

最近一次目录同步未能刷新此 README 快照。

dsh-dashscope-tool-adapter

DSH plugin: adapts DashScope / 阿里云百炼 DeepSeek endpoints that lack native tool calling.

Problem

DashScope's OpenAI-compatible endpoint (https://dashscope.aliyuncs.com/compatible-mode/v1) does not support native tool calling (function calling) for DeepSeek models. When DSH sends tool definitions, the API either ignores them or rejects the request.

Solution

This plugin converts tool definitions into prompt text and parses the model's text response for <|tool_call|> markers. It then constructs standard BlockAssembler-compatible tool-call chunks, which the DSH agent loop executes natively.

  • Non-DashScope providers: untouched, native tool calling works as usual.
  • DashScope providers: tools are described in the system prompt, and the model calls them via text markers.

Installation

dsh plugin add github:Uersx/dsh-dashscope-tool-adapter

Or manually:

dsh plugin --profile web add github:Uersx/dsh-dashscope-tool-adapter

How it works

  1. A systemPrompt.section() injects text-based tool descriptions into the system prompt.
  2. The llm/stream waterfall intercepts only DashScope calls.
  3. The model outputs <|tool_call|>{"name":"...","arguments":{...}}</|tool_call|> in its text.
  4. The plugin parses these markers and constructs standard tool-call-delta / block-end chunks.
  5. The DSH agent loop executes the tools natively.

License

MIT

仓库信息

开发语言
TypeScript
许可证
未提供
最后更新
2026年8月18日 04:55

谨慎安装

请检查源代码、权限、生命周期脚本、依赖与网络访问;不受信任的插件应先在隔离环境中测试。