You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upgrade vendored llama.cpp so local models route tools reliably (gates the skill-routing redesign; supersedes #1329 verdict) #1355
NodeSpace's local inference uses llama-cpp-2 0.1.146, whose vendored llama.cpp C++ source lags well behind upstream. Empirical testing (build 8660 via llama-server, same GGUFs, native chat templates) showed that tool-call failures previously attributed to model capability are caused by this old vendored engine.
This issue upgrades the vendored llama.cpp and verifies the fix with pinned regression fixtures. It is the gating prerequisite for the skill-mediated tool-routing redesign (ADR-036) — that design was validated on build 8660, not on our current binding.
Ministral 8B: inside NodeSpace = malformed JSON {"name":"amount_due","number"} (dropped type key), looped 5×. On current llama.cpp = flawless nested tool call.
This invalidates #1329's negative verdict — it measured the broken binding, not model capability.
Proposed Solution
Bump llama-cpp-2 / its vendored llama.cpp to a current build (target parity with the build-8660 behavior verified in testing).
Re-verify tool calling across the shipped models.
Acceptance Criteria
Vendored llama.cpp upgraded; cargo build green with metal feature.
Regression fixtures pinned: the two historical failures (Ministral 8B dropped-type malformed create_schema; Gemma 4 12B near-zero tool use) are encoded as tests that now PASS.
[TOOL_CALLS] Mistral parser still works — the custom parser ADR-030 deliberately preserved is verified against the upgraded engine (its own acceptance criterion, since the bump risks breaking it).
Tool-calling smoke test green for: Gemma 4 E4B/12B, Ministral 3B/8B, Qwen3-8B, Mistral Small 3.2.
No regression in embedding generation (nomic-embed path).
Code passes bun run quality:fix; tests pass.
Technical Specifications
Reference Files
packages/nlp-engine/Cargo.toml — llama-cpp-2 pin (>=0.1.146, features metal).
packages/nlp-engine/src/chat/mod.rs — sampler chain, OpenAIChatTemplateParams (json_schema/grammar currently None), [TOOL_CALLS] handling.
Build 8660 also exposes --json-schema / --grammar constrained decoding (currently plumbed but unwired in OpenAIChatTemplateParams). Wiring grammar-constrained tool-call decoding is a possible follow-up, out of scope here.
Activity
malibio commentedon Jun 6, 2026
Frontend baseline: 134 test files, 3844 tests passing
Upgrade vendored llama.cpp so local models route tools reliably (gate…