koboldcpp 1.120 (Windows, koboldcpp.exe, CUDA / kobolcpp_cublas.dll)
Windows 11 Pro 10.0.22631, i7-13700K, 128 GB DDR4, 4x RTX 3090 (96 GB VRAM)
Model: unsloth/DeepSeek-V4-Flash-0731-GGUF, UD-Q8_K_XL (150.75 GiB, arch = deepseek4)
Client: Cherry Studio [v2.0.12 - v2.0.14] via the OpenAI-compatible /v1/chat/completions endpoint
Launch config (relevant keys): contextsize 292144, quantkv bf16, noswa true, autofit true,
batchsize 1024, threads 8, usemmap false, jinja true, debugmode 1
Universal tool calling: tool name is not constrained by grammar, so long-context / creative-sampler runs produce near-miss names
Summary
Cherry Studio exposes MCP tools with hashed names such as mcp__CherryMemory__createEntities_603184f9d0bef38c8450. In a 165k-token conversation with creative sampler settings (temperature 1.0, top-p 0.95, DRY and min_p enabled), stage 2 repeatedly produced names that were almost right:
mcp__CherryMemory__call_57130
mcp__CherryMemory__createEntits_603184f9d0bf38c8450
mcp__CherrryMemory__createEntities_60_3184f9d0be_f38c8450
mcp__CherryMemory__crerateEntities_603184f90bef38c8450
mcp__CherryMemory__getEntities_603184f9
and in one round an empty array:
Generating (5 / 16384 tokens)
Output: [ ]
Stage 1 had chosen the correct name in its reasoning JSON. The client rejected each call ("Model tried to call unavailable tool ..."), the model retried, and this looped for 1 h 41 min until the client's tool-call limit stopped it.
Lowering temperature to 0.5 / top-p 0.9 and disabling DRY and min_p fixed it immediately: the same request then completed successfully. So the root cause is that the tool name is free-form text in stage 2 and repetition-suppressing samplers corrupt it.
Request
Constrain tool_name (and ideally the argument keys) to the provided tool list via the grammar used in stage 2, and/or run the tool-call stages with neutral sampler settings independent of the user's creative settings.
Related: #2464 #2465 #2466
Universal tool calling: tool name is not constrained by grammar, so long-context / creative-sampler runs produce near-miss names
Summary
Cherry Studio exposes MCP tools with hashed names such as
mcp__CherryMemory__createEntities_603184f9d0bef38c8450. In a 165k-token conversation with creative sampler settings (temperature 1.0, top-p 0.95, DRY and min_p enabled), stage 2 repeatedly produced names that were almost right:and in one round an empty array:
Stage 1 had chosen the correct name in its reasoning JSON. The client rejected each call ("Model tried to call unavailable tool ..."), the model retried, and this looped for 1 h 41 min until the client's tool-call limit stopped it.
Lowering temperature to 0.5 / top-p 0.9 and disabling DRY and min_p fixed it immediately: the same request then completed successfully. So the root cause is that the tool name is free-form text in stage 2 and repetition-suppressing samplers corrupt it.
Request
Constrain
tool_name(and ideally the argument keys) to the provided tool list via the grammar used in stage 2, and/or run the tool-call stages with neutral sampler settings independent of the user's creative settings.Related: #2464 #2465 #2466