Skip to content

Conversation

@aldehir
Copy link
Collaborator

@aldehir aldehir commented Dec 3, 2025

Note

This is intended to be an functional demonstration of the PEG parser implemented in #17136, and as such depends on that PR. I have squashed the commits down to make it easy to view the parser implementation for Ministral 3 Reasoning/Instruct and Mistral Large 3 Instruct.

Parser implementation for Ministral 3 Reasoning/Instruct and Mistral Large 3 Instruct. It deviates from the previous Mistral outputs by generating tool calls in the form: [TOOL_CALLS]tool_name[ARGS]{"arg1": ... }...

Features

  • Extracts reasoning to reasoning_content1
  • Formats system and assistant messages containing reasoning_content into {"type": "thinking", "thinking": "..."} content blocks the chat template expects. server: thinking type rejected as invalid but used by Ministral 3 #17700
  • Supports tool calling for both tool_choice = auto and tool_choice = required (with thinking).
  • Supports parallel tool calls
  • Supports response_format with thinking.

Keeping this as a draft until #17136 gets the stamp of approval.

Footnotes

  1. Currently only reasoning_format = auto/deepseek is supported. I was unaware the reasoning format is not exposed during chat param init, but this is easy to address.

@aldehir aldehir changed the title common : add parser for ministral/mistral 3 common : add parser for ministral/mistral large 3 Dec 3, 2025
@github-actions github-actions bot added documentation Improvements or additions to documentation testing Everything test related examples server labels Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation examples server testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant