Uersx/dsh-dashscope-tool-adapter ↗★ 0

dsh-dashscope-tool-adapter

为缺乏原生工具调用支持的DashScope端提供适配器。 适合在DSH中使用阿里云百炼DeepSeek模型,且需要启用工具调用功能的用户。

包名
dsh-dashscope-tool-adapter
兼容性
待验证
Harness 依赖范围
^0.1.0-rc.5
Cordis 依赖范围
^4.0.1
版本
0.2.0
最近更新
2026年8月18日

安装

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

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 `` 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 {"name":"...","arguments":{...}} 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