Skip to content

chat : fix LFM2 tool-call parsing double-escaping#24667

Merged
pwilkin merged 2 commits into
ggml-org:masterfrom
tdakhran:tarek/fix/lfm-tool-call-escape
Jun 15, 2026
Merged

chat : fix LFM2 tool-call parsing double-escaping#24667
pwilkin merged 2 commits into
ggml-org:masterfrom
tdakhran:tarek/fix/lfm-tool-call-escape

Conversation

@tdakhran

Copy link
Copy Markdown
Contributor

Overview

Prevent double escaping in the LFM2 tool-calling parser

Output before fix:

    {
      "type": "function",
      "function": {
        "name": "python",
        "arguments": "{\"code\":\"print('hello')\\\\nprint('world')\"}"
      }
    }

Output after fix:

    {
      "type": "function",
      "function": {
        "name": "python",
        "arguments": "{\"code\":\"print('hello')\\nprint('world')\"}"
      }
    }

Additional information

Add extra test cases

Requirements

@tdakhran tdakhran requested review from a team and pwilkin as code owners June 15, 2026 18:18
@github-actions github-actions Bot added the testing Everything test related label Jun 15, 2026
@pwilkin pwilkin merged commit 7dad2f1 into ggml-org:master Jun 15, 2026
1 check passed
@tdakhran tdakhran deleted the tarek/fix/lfm-tool-call-escape branch June 15, 2026 20:13
papamoose pushed a commit to papamoose/llama.cpp that referenced this pull request Jun 27, 2026
* Add escape test cases

* chat : fix LFM2 tool-call parsing double-escaping
adrianhoehne pushed a commit to adrianhoehne/llama.cpp that referenced this pull request Jul 5, 2026
* Add escape test cases

* chat : fix LFM2 tool-call parsing double-escaping
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.

3 participants