Skip to content

Fix issue where tool arguments can appear in any JSON-valid order - #26472

Open
i386 wants to merge 1 commit into
ggml-org:masterfrom
Mesh-LLM:agent/llama-tagged-tool-argument-order
Open

Fix issue where tool arguments can appear in any JSON-valid order#26472
i386 wants to merge 1 commit into
ggml-org:masterfrom
Mesh-LLM:agent/llama-tagged-tool-argument-order

Conversation

@i386

@i386 i386 commented Aug 2, 2026

Copy link
Copy Markdown

Overview

The original code imposed an ordering rule that JSON objects do not have. This caused llama.cpp’s tagged tool-call output parser to reject sequences whose argument tags did not follow its strict required-before-optional ordering.

Requirements

  • YES I have read and agree with the contributing guidelines
  • AI usage disclosure: YES, AI was used to find and fix this problem. I have eyeballed the code and manually tested

…s in any order that is valid json. Required fields are still enforced and duplicate args are forbidden. Tests cover reordered fields, missing required fields, and duplicates.

Assisted-by: Codex
@i386
i386 requested review from a team and pwilkin as code owners August 2, 2026 20:40
@github-actions github-actions Bot added the testing Everything test related label Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant