chat : handle tool calls with no required args in TAG_WITH_TAGGED format#20764
Merged
pwilkin merged 2 commits intoggml-org:masterfrom Mar 19, 2026
Merged
chat : handle tool calls with no required args in TAG_WITH_TAGGED format#20764pwilkin merged 2 commits intoggml-org:masterfrom
pwilkin merged 2 commits intoggml-org:masterfrom
Conversation
|
Hi @jpohhhh, thanks for your contribution! Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:
Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below. |
pwilkin
approved these changes
Mar 19, 2026
aldehir
approved these changes
Mar 19, 2026
Co-authored-by: Aldehir Rojas <hello@alde.dev>
Ethan-a2
pushed a commit
to Ethan-a2/llama.cpp
that referenced
this pull request
Mar 20, 2026
…mat (ggml-org#20764) * chat : handle tool calls with no required args in TAG_WITH_TAGGED format * Update tests/test-chat.cpp [no ci] Co-authored-by: Aldehir Rojas <hello@alde.dev> --------- Co-authored-by: Piotr Wilkin (ilintar) <piotr.wilkin@syndatis.com> Co-authored-by: Aldehir Rojas <hello@alde.dev>
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.
regarding #20650
When a tool has no required args, the model may emit <tool_call>name</tool_call> with no arg tags. The grammar tried to peek ahead for an arg tag after the tool name, even when all args were optional, so the peek failed, and the tool call was not recognized.