Repository navigation
[defer] fix(deepseek-web): support native DSML tool calls - #13345
diegosouzapw merged 3 commits into
Conversation
|
are you already solve and can use deepseek web for coding copilot |
|
Yes, I tested it end-to-end with real DeepSeek Web traffic and the tool-calling issue is solved. I can use DeepSeek Web as a coding copilot with this patch. The full tool loop works correctly, including tool calls, execution, tool results, and the following model turn. I tested it with real commands like One thing worth mentioning is that DeepSeek can ban the account when using it this way. This actually happened to me during testing, and I had to create a new account. Other than that account-related risk, everything worked correctly for me. |
|
Thorough, well-tested fix for the native DSML dialect — the stack-based tokenizer and the L2 |
Reconciles the native DSML parser with the tip's cheaper-inference#13930/cheaper-inference#14446 handling in deepseekWebTools.ts: the sloppy-closer DSML parser runs on the original text first; when it yields no calls the tip's normalizing path runs unchanged (extracted into normalizeDeepSeekMarkup). Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
|
Re-homed to |
3fd15a7
into
cheaper-inference:release/v3.8.52
|
Thanks @espokaos-ops — merged into |
Summary
DeepSeek Web can emit native DSML tool calls even when OmniRoute requests the canonical
<tool>{JSON}</tool>format.Previously, the DeepSeek Web translator only recognized
<tool>/<tool_call>markers. Native DSML was therefore returned as normal text, causing the executor to emitfinish_reason: stopinstead oftool_calls. Agent clients such as OpenCode could then hang after the model indicated that it wanted to use a tool.This patch adds native DSML parsing to the DeepSeek Web translator.
Changes
<calls>/<invoke>/<parameter>markers.<invoke>calls as well as the<calls>envelope.Root cause
The previous parser contained a fail-fast check equivalent to:
Native DSML therefore never reached the tool parser.
The executor subsequently observed:
instead of emitting OpenAI-compatible
tool_calls.Validation
The implementation was validated against real DeepSeek Web traffic containing native DSML.
20/20 dedicated DSML unit tests pass.
34/34 adversarial regression checks pass.
3/3 executor split checks pass.
6/6 byte-equivalence checks pass.
Existing non-DSML behavior remains equivalent.
Full live tool loop validated after rebuilding the patched bundle:
echo HOLAfree -huname -aA real captured native DSML call was successfully converted to an OpenAI-compatible function call and executed through Bash.
Scope / limitations
This is intentionally a focused DSML translator rather than a general XML/DSML parser.
Known edge cases include literal DSML markers embedded inside parameter values. The implementation is fail-safe for malformed or incomplete tool calls and does not execute invalid tool invocations.
No unrelated files, generated bundles, backups, logs, or temporary PoC artifacts are included in the commit.