Repository navigation
fix(llama-cpp): constrain strict LFM arguments - #12799
Draft
mudler-agent wants to merge 2 commits into
Draft
mudler-agent wants to merge 2 commits into
mudler-agent wants to merge 2 commits into
Conversation
Carry a local native patch that preserves strict through tool parsing and serialization. Keep false and absent values compatible with legacy callers. Add a CPU-only native round-trip regression test. This prerequisite does not enforce strict argument schemas yet. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
The native LFM builder accepts arguments that violate strict schemas. Carry a local schema-aware patch and validate decoded mapped values. Require complete final tool envelopes before publishing calls. Add offline native grammar, parser and exact-mapping regressions. Build integration and full acceptance remain pending in the draft PR. Assisted-by: nib:gpt-6.1-sol Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This branch has not been deployed
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
Carry a LocalAI-only llama.cpp patch for strict native LFM2/LFM2.5 tool arguments. The pinned Python-style builder ignores required fields and other schema constraints. Offline reproduction accepts 30 invalid cases in the original 44-case matrix.
function.strictthrough native tool parsing and serialization.Related: #12772, #12783, #12787. No llama.cpp upstream submission is part of this PR.
Notes for Reviewers
This is a draft, not a complete or deployed repair. The patch targets llama.cpp
c0fd78626405c6d9b934efef0ec7291fcc20e3d6.Remaining before ready for review/merge:
Independent draft-publication review passes fresh patch provenance, all three native tests (13.24 seconds), matrix and edge checks. Partial streaming is unchanged by inspection of the guard, but lacks direct regression coverage in these new harnesses.
No live inference, model loading, GPU access or deployment was performed. These tests establish offline native parser behavior, not conformance of the installed backend or model sampling.
Verification
From the LocalAI root, with an isolated exact-pin source tree patched as described in
backend/cpp/llama-cpp/tests/README-native-strict.md:Latest local run:
Full
make build, tokenized sampling and live model checks are not run.Signed commits
Assisted-by: nib:gpt-6.1-sol).