Skip to content

Add support for Mistral 3 series templates#13

Open
aldehir wants to merge 5 commits intoochafik:mainfrom
aldehir:fix-mistral-3-series
Open

Add support for Mistral 3 series templates#13
aldehir wants to merge 5 commits intoochafik:mainfrom
aldehir:fix-mistral-3-series

Conversation

@aldehir
Copy link

@aldehir aldehir commented Dec 13, 2025

The new Mistral 3 (2512) series models do not allow empty assistant content, which affects Minja's ability to determine its tool calling capabilities. This adds an additional requires_non_empty_content capability.

ref: ggml-org/llama.cpp#17713 (comment)

aldehir and others added 2 commits December 13, 2025 17:27
The new 2512 Mistral 3 series models do not allow empty assistant
content, which affects Minja's ability to determine its tool calling
capabilities. This adds an additional `requires_non_empty_content`
capability.
@CISC
Copy link
Collaborator

CISC commented Dec 20, 2025

Hmmm, looks like the tests are failing to download templates, thought that was fixed? @ochafik

@CISC CISC requested a review from ochafik December 20, 2025 15:16
return json("");
}
if ((content.is_null() || (content.is_string() && content.empty())) && caps_.requires_non_empty_content) {
return json("<Assitant Needle>");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please extract a constant (+ fix typo) above next to the others

        const std::string assistant_needle = "<Assistant Needle>";

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm disturbed by this needle. The semantics here is you need a non-empty content, not that you need a needle to be found from outside (otherwise someone would have passed the needle explicitly).

Just use " " here?

Copy link
Author

@aldehir aldehir Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you agree there is no need to extract a constant if I use " "?

aldehir and others added 2 commits December 30, 2025 00:41
Co-authored-by: Olivier Chafik <olivier.chafik@gmail.com>
@aldehir aldehir requested a review from ochafik December 31, 2025 09:00
@CISC
Copy link
Collaborator

CISC commented Jan 3, 2026

@ochafik gentle ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants