• Stefy Lanza (nextime / spora )'s avatar
    parser: handle DeepSeek V4 DSML tool calls; reword waiting message · 7f39ce8f
    Stefy Lanza (nextime / spora ) authored
    DeepSeek V4 (ds4) emits native tool calls as <|DSML|invoke name="…">
    <|DSML|parameter name="p" string="true">val</|DSML|parameter></|DSML|invoke>
    (the | is U+FF5C). No parser recognised this, so ToolCallParser returned None
    and the raw markup leaked to the client as content even though ds4 reported
    finish=tool_calls.
    
    - parse_deepseek_dsml_tool_calls(): extract (name, args); string="false" params
      are JSON-decoded, others kept as strings; ASCII | tolerated.
    - Wired into DeepSeekParser and ToolCallParser.extract_tool_calls (the live path).
    - strip_dsml_tool_calls(): drop the DSML block from displayed content in both
      strip_tool_calls_from_content paths. Guarded by 'DSML' in text -> no effect on
      other models.
    
    Also reword the slow-reply notice from "Waiting for model to load..." to
    "Waiting for model reply..." (the model is usually loaded, just slow).
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    7f39ce8f
Name
Last commit
Last update
..
cache Loading commit data...
__init__.py Loading commit data...
acceleration.py Loading commit data...
capabilities.py Loading commit data...
grammar.py Loading commit data...
hf_loading.py Loading commit data...
manager.py Loading commit data...
parser.py Loading commit data...
pipeline_cache.py Loading commit data...
quant.py Loading commit data...
ram_monitor.py Loading commit data...
templates.py Loading commit data...
thermal.py Loading commit data...
tmp_janitor.py Loading commit data...
tool_call_grammar.gbnf Loading commit data...
turboquant.py Loading commit data...
utils.py Loading commit data...