#59087·vllm

[Bug]: `--tool-call-parser mistral` on a non-Mistral tokenizer can start but then answers EVERY chat request with 500

Author: YunzezCreated Sep 28, 2026Updated Sep 28, 2026
Labelsbugtool-callingmistral

Your current environment

The output of python collect_env.py
Your output of `python collect_env.py` here

Describe the bug

Very interesting issue, the Mistral tool-call parser needs the tokenizer's [TOOL_CALLS] token. A tokenizer that does not have one is accepted at startup: the server boots, logs no error, and /health returns 200. Every subsequent chat request then fails:

HTTP 500
{"error":{"message":"Mistral parser could not locate the tool call token in the tokenizer!",
          "type":"InternalServerError","param":null,"code":500}}

Below are some Claude blob describing the experiemnts:

Including requests that have nothing to do with tools. A plain {"messages":[{"role":"user", "content":"Say hi."}]} with no tools field is answered with the same 500, because the parser is constructed for every chat completion once --enable-auto-tool-choice is on.

Measured 2026-09-19 with a 17-shape sweep (plain chat, tools, two tools, tool_choice none/required/named, truncated variants, JSON schema, stop, logprobs, n=2, long prompt), each in non-streaming, repeated non-streaming and streaming form:

requests status
51 of 51 500 Mistral parser could not locate the tool call token in the tokenizer!
of which plain (no tools in the body) 3 of 3 also 500

The same sweep against hermes, granite, pythonic, xlam and kimi_k2 on the same model returns 200 throughout (their parsers degrade to "no tool call found" instead of raising).

Re-run on 0.29.0 the same evening with the same 17-shape sweep on Qwen/Qwen2.5-0.5B-Instruct: 51 of 51 requests 500 again, byte-identical complaint. Whatever 0.29 changed in the structured-output validators, it did not touch this.

Re-checked 2026-09-20 on a second model, Qwen/Qwen3-0.6B, with the repro below:

request status
GET /health 200 -- the server reports healthy
chat, no tools in the body 500
chat with one tool 500
/v1/completions (the parser is not in that path) 200

But def somethings we want to fix, either

  1. fail at startup -- the parser's requirement on the tokenizer is knowable at launch, so vllm serve should refuse the combination rather than serve a dead endpoint; or
  2. fail the tool requests only, with a 4xx -- a request that carries no tools does not need the parser at all, and a request that does is a client/server configuration error, not an internal one.

Reproduction repro_mistral_parser_foreign_tokenizer_500.py

vllm serve Qwen/Qwen2.5-0.5B-Instruct --enable-auto-tool-choice --tool-call-parser mistral

Just point it the script at a server launched with the flags above and it sends three requests -- plain chat, a chat with a tool, and a /v1/completions control (which does not touch the parser).

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.