Uersx/dsh-dashscope-tool-adapter ↗★ 0
dsh-dashscope-tool-adapter
DSH plugin: adapts DashScope/闂傚啫娼¢崳閿嬬閹寸姵顏ラ柣?DeepSeek endpoints that lack native tool calling by converting tool definitions to prompt text and parsing model responses for tool calls.
AI 분석
核心用途为将工具定义转换为提示词,并解析模型文本回复以支持原生不支持工具调用的 DashScope 端点。适合在百炼平台上使用 DeepSeek 模型的用户。
설치
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Uersx/dsh-dashscope-tool-adapterdsh-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
- A
systemPrompt.section()injects text-based tool descriptions into the system prompt. - The
llm/streamwaterfall intercepts only DashScope calls. - The model outputs
{"name":"...","arguments":{...}}in its text. - The plugin parses these markers and constructs standard
tool-call-delta/block-endchunks. - The DSH agent loop executes the tools natively.
License
MIT