Feature request: dedicated tokens for the think / tool-call markers (quoted tags ar e indistinguishable from real ones)
Thanks again for Ripple. We run it as the main coding agent on our lab fleet, and this is
the one recurring issue we can't fully fix downstream.
The problem. The four markers are plain text and tokenize into ordinary pieces:
| marker | tokens |
|---|---|
<think> |
<th ink > |
</think> |
</ think > |
<tool_call> |
< tool _call > |
</tool_call> |
</ tool _call > |
When the model mentions a marker, for example while explaining a chat template, quoting
a closing tag in its reasoning, or writing a file that contains one, the output is byte-fo
r-byte and token-for-token the same as a real marker. Any server-side parser can only guess from the surrounding text. In practice with a coding agent:
- quoting
</think>while reasoning ended the reasoning early and leaked the rest into the visible answer
(seen live); - a fenced example of the call format was executed as a real tool call;
- the tool-call tag on a line of its own swallowed the text after it;
<think>quoted inside reasoning was silently dropped.
These are being worked around in vLLM's ripple parser (vllm-project/vllm#69243, #69265,
#69268, #70472, #70928). Those fixes rely on the template's newline framing and on Mark
down code fences. Some cases stay ambiguous for any parser: a closer quoted on its own lin
e, or a call example written outside a code block.
Request.
For a future release, please consider emitting the markers as dedicated added
tokens (as Qwen3 and other Hermes-style models do), so a real marker is one reserved token id
and a mention is ordinary text. Serving engines can then match on the token id and ne
ver on text. Parsers would match on ids (vLLM's parser engine already supports token-id te
rminals), and the ambiguity goes away entirely.
We understand this is a training-time change. Adding the tokens to the tokenizer alone would not help,
because the current weights emit the text pieces. Happy to share our parser harness and test cases if useful.