Repository navigation
Upgrade vendored llama.cpp so local models route tools reliably (gates the skill-routing redesign; supersedes #1329 verdict) - #1361
Conversation
…loses #1355) llama-cpp-2 v0.1.146 already vendors llama.cpp commit e21cdc11 (2026-04-13), which is 123 commits ahead of build b8660 (2026-04-03) — the engine version empirically verified to fix tool-call failures in Ministral 8B and Gemma 4 12B. No crate version bump is needed; the constraint was already >=0.1.146. Adds five regression fixture tests to chat::parser::tests: - Ministral 8B dropped-type-key malformed JSON is rejected (not swallowed) - Ministral 8B complete create_schema with type field is accepted - Ministral 8B streaming path surfaces Error cleanly on broken JSON - Gemma 4 12B OAI-compat delta shape (chat_format=3) is parsed correctly - Gemma 4 [TOOL_CALLS] sentinel path (Format C) continues to work post-upgrade Updates Cargo.toml comment to document the vendored llama.cpp commit and its relationship to build b8660. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review — PR #1361 (Issue #1355)Reviewer: Principal Engineer This PR correctly identifies that no crate version bump was needed and delivers the right artifacts: a documented Cargo.toml comment and five regression fixture tests. The overall change is a net positive. The findings below are ranked by priority. Findings[Improvement]
|
| Criterion | Status |
|---|---|
| Cargo.toml comment updated | Covered |
| Regression fixtures pinned (Ministral 8B + Gemma 4 12B) | Partially — 4/5 tests exercise the parser; Gemma4 delta test is a structural gap |
[TOOL_CALLS] Mistral parser verified post-upgrade |
Covered (regression_gemma4_mistral_sentinel_format_still_works) |
| Tool-calling smoke test across all shipped models | Not documented as verified |
| No embedding regression | Not documented as verified |
bun run quality:fix / tests pass |
Assumed green; no CI failure visible |
malibio
left a comment
There was a problem hiding this comment.
Four of five regression fixtures exercise the actual parser correctly and the Cargo.toml documentation is clear. The Gemma 4 delta test is a structural gap (it tests serde_json, not emit_oai_delta) and should be addressed as a follow-up. The two model-level acceptance criteria (live smoke tests, embedding regression) should be documented as manually verified or tracked as a follow-up. Full review in the comment above.
…mit_oai_delta The original regression_gemma4_12b_tool_call_delta_accepted test in parser.rs only called serde_json::from_str, not any production code. Moving the test to mod.rs (where emit_oai_delta is in scope) and calling it directly means a chat_format=0 regression that silences the tool_calls key would now fail the test, not pass it. Uses std::sync::Mutex to satisfy emit_oai_delta's `impl Fn + Send` bound. Removes the weaker serde_json-only version from parser.rs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s the skill-routing redesign; supersedes #1329 verdict) (#1361) * Pin llama-cpp-2 ≥0.1.146 regression fixtures for tool-call failures (closes #1355) llama-cpp-2 v0.1.146 already vendors llama.cpp commit e21cdc11 (2026-04-13), which is 123 commits ahead of build b8660 (2026-04-03) — the engine version empirically verified to fix tool-call failures in Ministral 8B and Gemma 4 12B. No crate version bump is needed; the constraint was already >=0.1.146. Adds five regression fixture tests to chat::parser::tests: - Ministral 8B dropped-type-key malformed JSON is rejected (not swallowed) - Ministral 8B complete create_schema with type field is accepted - Ministral 8B streaming path surfaces Error cleanly on broken JSON - Gemma 4 12B OAI-compat delta shape (chat_format=3) is parsed correctly - Gemma 4 [TOOL_CALLS] sentinel path (Format C) continues to work post-upgrade Updates Cargo.toml comment to document the vendored llama.cpp commit and its relationship to build b8660. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Address review: move Gemma 4 delta regression to mod.rs to exercise emit_oai_delta The original regression_gemma4_12b_tool_call_delta_accepted test in parser.rs only called serde_json::from_str, not any production code. Moving the test to mod.rs (where emit_oai_delta is in scope) and calling it directly means a chat_format=0 regression that silences the tool_calls key would now fail the test, not pass it. Uses std::sync::Mutex to satisfy emit_oai_delta's `impl Fn + Send` bound. Removes the weaker serde_json-only version from parser.rs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Closes #1355