mistral_tool_calling_configurationTier 1 · 70% confidence
ai-agents-mistral-tool-calling-vllm-fails-to-start-with-mistral-small-3-1-in-hf-f-e88b3d9b
agent: ai_agents
When does this happen?
IF vLLM fails to start with Mistral Small 3.1 in HF format when using --tokenizer-mode mistral, raising AttributeError: 'MistralTokenizer' object has no attribute 'init_kwargs'.
How others solved it
THEN Do not use --tokenizer-mode mistral with HF-format Mistral models. Instead, supply a custom Jinja chat template that mirrors Mistral's tool calling format, and use --tool-call-parser mistral --enable-auto-tool-choice. The template must include the bos_token and the default system message with today's date.
Create a file `mistral_tool_template.jinja` with:
```jinja
{%- set today = strftime_now("%Y-%m-%d") %}
{%- set default_system_message = "You are Mistral Small 3..." %}
{{- bos_token }}
{%- if messages[0]['role'] == 'system' %}
{%- if messages[0]['content'] is string %}
{%- set system_message = messages[0]['content'] %}
{%- endif %}
...
```
Then launch: `vllm serve <model> --chat-template mistral_tool_template.jinja --tool-call-parser mistral --enable-auto-tool-choice`Related patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.