Add support for Jinja-based tool calling (MiniCPM5 and other recent models).#1014
Draft
vladislavdonchev wants to merge 2 commits into
Draft
Add support for Jinja-based tool calling (MiniCPM5 and other recent models).#1014vladislavdonchev wants to merge 2 commits into
vladislavdonchev wants to merge 2 commits into
Conversation
added 2 commits
July 10, 2026 07:44
Fold the reconciled llama.cpp bump (c818263f2, MiniCPM5 parser #24889) into the canonical patch set after proving a clean build and unit tests. - Regenerate 39 patches via generate-patches; add dflash cosmocc compile fix - Update BUILD.mk: drop removed json-partial, add dflash + server-stream sources - Link server-stream.o in llamafile/BUILD.mk LLAMAFILE_SERVER_SUPPORT_OBJS - Pass --jinja -ngl 0 in tool_calling integration tests for Jinja-templated models Verified: generate-patches → verify-clean (setup + clean build + check) green; MiniCPM5 tool_calling integration tests pass (direct build and .llamafile bundle).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bumps the
llama.cppsubmodule toc818263f2, which adds upstream MiniCPM5 chat/tool-call parsing (ggerganov/llama.cpp#24889). Regenerates the fullllama.cpp.patches/set so the cosmocc build still applies cleanly, and wires new upstream sources into the llamafile build.Branch:
llamacpp_c818263f2(per CONTRIBUTING.md / bump workflow — not committed directly tomain)Submodule
llama.cpp→c818263f2(chat: implement minicpm5 parser)Patch / build reconciliation
generate-patchesafter proving a clean build +make checkllamafile-files/BUILD.mk: drop removedjson-partial.cpp; adddflash.cppandserver-stream.cppllamafile/BUILD.mk: linkserver-stream.cpp.oinLLAMAFILE_SERVER_SUPPORT_OBJSsrc_models_dflash.cpp.patch: cosmocc/clang fix — movebuild_arch_graph()aftergraph<true>/graph<false>template specializations (same pattern as the existingeagle3patch)Tests
--jinja -ngl 0so Jinja-templated models (including MiniCPM5) parse tool calls correctlyVerification performed locally
make setup— all patches apply cleanlyo/llamafile/llamafilemake check— unit tests greenllamafile:verify-cleanround-trip (reset → setup → clean build → check)tests/test_tool_calling.py(3/3) against built binary and rebundled.llamafilewith MiniCPM5-1B Q8_0Host handoff (not run in-session — per bump doc)
GET /,/_app/immutable/...)PR Type
Relevant issues
llama.cppsubmodule patch bump (not a new user-facing feature or architectural change per CONTRIBUTING.md §Discuss major changes)Checklist
llama.cpp/,whisper.cpp/, orstable-diffusion.cpp/, I also updated the matching*.patches/files.AI Usage Information
check_patches.sh→ reconcile →generate-patches→verify-clean), patch regeneration, BUILD.mk reconciliation for upstream file moves, the cosmoccdflash.cppcompile-order fix, integration-test updates (--jinja), and local verification (build, unit tests, MiniCPM5 tool-calling integration tests). All changes were reviewed against llamafile's patch workflow docs and CONTRIBUTING.md; submodule edits were made only in-place for patch generation, withllama.cpp.patches/as the committed source of truth.When answering reviewer questions, please respond yourself rather than pasting reviewer comments into an AI system and posting the reply back unchanged.