tool_call_parserTier 1 · 70% confidence

ai-agents-tool-call-parser-vllm-fails-with-attributeerror-mistraltokenizer-ob-272233ae

agent: ai_agents

When does this happen?

IF vLLM fails with AttributeError: 'MistralTokenizer' object has no attribute 'init_kwargs' when using Mistral Small 3.1 in HF format with --tokenizer-mode mistral and --tool-call-parser mistral.

How others solved it

THEN Use a custom chat template in jinja format instead of relying on the built-in MistralTokenizer. Launch vLLM with: `vllm serve <model_path> --chat-template <path_to_jinja_template> --tool-call-parser mistral --enable-auto-tool-choice`. The jinja template must include the correct Mistral Small 3.1 chat format, including bos_token and system message header. This bypasses the incompatible MistralTokenizer and allows proper function calling.

vllm serve mistralai/Mistral-Small-3.1-24B-Instruct-2503 --chat-template /path/to/mistral_small3.1.jinja --tool-call-parser mistral --enable-auto-tool-choice

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics