Repository navigation
Adopt Gemma 4 E4B as the locked native model (supersedes ADR-046's Ministral 8B lock) - #1639
Conversation
Code Review SummaryNet positive, mechanically clean, and well-justified by ADR-056 (which I read in full and treat as sound background per the review brief). The two-file diff correctly and minimally implements the "recommendation logic" half of the ADR-056 decision. However, verification of downstream call sites surfaced a real, user-facing scope gap: the actual frontend model picker and local-agent dropdown are gated by a separate curated constant that this PR does not touch, and that constant still excludes all Gemma 4 variants. As written, this PR changes what the daemon recommends internally but does not change what a user can actually see or select in the app. I'd request changes on that basis, not on the core logic itself. FindingsCritical Issues
Suggested Improvements
Nitpicks
Requirements Check
RecommendationRequest changes. The core logic change ( |
malibio
left a comment
There was a problem hiding this comment.
REVIEW VERDICT: Request Changes (posted as --comment because GitHub disallows a formal request-changes review on your own PR). See the detailed findings comment above. Summary: core recommendation-logic change is correct and well-justified by ADR-056, but EXPOSED_GGUF_MODEL_IDS in packages/desktop-app/src-tauri/src/commands/chat_models.rs:54 still excludes all Gemma 4 variants, so the frontend model picker and local-agent dropdown cannot surface gemma-4-e4b-q4km at all post-merge — the ADR-056 decision is not yet observable to a real user. Recommend addressing before merge.
Review feedback addressedCritical — fixed:
Important — addressed:
Accepted as non-blocking gaps (per review's own framing):
Separately, corrected ADR-056 itself: the review didn't flag this, but a follow-up question from the user prompted me to independently verify (rather than take on faith) the #1634 tool-count-ceiling claim I'd cited as supporting evidence for the switch. Built a throwaway native-path probe ( All changes pushed ( Re-Review DecisionRE-REVIEW NEEDED. The critical finding involved a real, user-facing scope gap and a production code change ( |
Code Review Summary (Re-Review)Confirmed this is a re-review — the prior "Request Changes" comment (2026-07-12T01:35:11Z) is present on the PR, and its critical finding ( FindingsCritical Issues
Confirmed correct
RecommendationRequest changes (one more small round). The daemon-level and chat-agent-dropdown paths are now genuinely fixed end-to-end, but |
Round 2 review addressed + scope expandedRound 2 finding fixed: `LOCAL_FAMILIES` in `model-manager.svelte` (a second, independent allowlist gating the Settings model-grid and default-model dropdown) still had `['ministral', 'qwen35']` — same bug class as round 1's `EXPOSED_GGUF_MODEL_IDS` finding, just in a sibling file the first review didn't check. Fixed to `['gemma4']`. Swept the rest of the frontend for other per-surface allowlists per the review's own recommendation — none found. Scope expanded, at explicit user direction mid-review: full removal of the Qwen-family model catalog, not just excluding it from exposure. This is a separate decision from the Gemma 4 E4B swap, landed in the same PR/session, documented in ADR-056 (nodespace-docs). Removed entirely (catalog entries, not just hidden):
Net diff: 706 lines removed, 31 added. Closed #1477 and #1464 (Ornith re-enable/evaluation) as moot — there's no catalog entry left to re-enable or evaluate. Verification:
Pushed as `35085d05`. Re-Review DecisionRE-REVIEW NEEDED. This is a large, cross-cutting deletion (catalog, enum, streaming-pipeline internals, response processing, frontend types) touching working code paths, not just the model-swap scope the first two rounds reviewed. Worth a dedicated pass checking for any remaining dangling reference, orphaned test, or behavior change in the streaming/reasoning-routing restructuring specifically — that's the highest-risk piece (ChannelSplitter's carry-state logic changed shape when ThinkSplitter was removed from the finalize path). |
Code Review Summary (Round 3 — Qwen-family removal, commit
|
…loses #1636) ADR-046's decisive "12/12" claim for Ministral 8B traces to a bare assertion in issue #1370 with no retained artifact, and predates aichat-matrix.ts becoming an assertable eval (#1364). Re-measured both models on the current harness: Ministral 8B 11/12 (one over-eager create_schema call), Gemma 4 E4B 10/12 (a suboptimal query-tool choice and an incomplete update turn) — neither clears the old bar, and E4B shows none of Gemma 4 12B's disqualifying failure modes from ADR-046. - recommended_model_id() (the live gRPC default used by the CLI and Settings UI model picker) now returns Gemma 4 E4B instead of Ministral 8B. Gemma 4 12B/31B remain parked per ADR-046. - ai_chat_send_to_idle_test.rs (the ADR-048 Tauri-seam e2e test) now uses gemma-4-e4b-q4km; verified passing end-to-end (28.79s, no stall). Full rationale in ADR-056 (nodespace-docs), which supersedes ADR-046. Co-Authored-By: Claude <[email protected]>
The Rust-layer recommended_model_id() swap from the prior commit was invisible to real users: EXPOSED_GGUF_MODEL_IDS (the actual gate behind chat_model_list, which feeds both the CLI and the Settings UI model picker) was still hardcoded to ministral-8b-q4km. Flip it to gemma-4-e4b-q4km so the ADR-056 decision is live end-to-end, not just at the daemon/test layer. Also updates stale "Ministral 3B/8B" doc-comment examples and the non-Tauri mock fallback in agent-store.svelte.ts to match. Co-Authored-By: Claude <[email protected]>
…up issue Adds an inline comment directly on the GEMMA_4_E4B.id return line warning against "simplifying" it to recommended_model_id_for(Gemma4), which would silently reintroduce the parked 12B/31B tiers on higher-RAM machines. Doc comments don't show in a single-line diff view, so this is a second line of defense against exactly that regression. Also files #1640 to track the Scenario 5/6 prompt-tuning work ADR-056 already calls for, and links it from the ADR (nodespace-docs). Co-Authored-By: Claude <[email protected]>
Per explicit direction, drop Qwen3 8B, Qwen3.5 9B, Qwen3.6 35B-A3B, and the Qwen3.5-based Ornith 1.0 9B entirely -- not just from the exposed/ recommended set, but from the codebase. This is a separate decision from the Gemma 4 E4B swap, made in the same session; documented in ADR-056 (nodespace-docs). - model_manager.rs: remove the four catalog entries and their ModelFamily::Qwen3/Qwen35/Qwen36 match arms - agent_types.rs / agent-types.ts: remove the corresponding ModelFamily enum variants (Rust and TypeScript) - chat/parser.rs: remove the "Format D" Ornith/Qwen3.5 XML <tool_call> parser (parse_tool_calls_xml, parse_xml_tool_call_block) and its tests - chat/mod.rs: remove the <tool_call> XML interception branch in emit_oai_delta and the ThinkSplitter struct/reasoning-routing logic that existed solely for Ornith's <think> convention -- restructured emit_oai_delta's signature and the streaming generation loop's finalize path accordingly - response_processing.rs: remove the strip_ornith_tool_call_leak stripper and its tests - chat_models.rs / model-manager.svelte / model-store.svelte.ts: drop the stale Qwen/Ornith references from EXPOSED_GGUF_MODEL_IDS, LOCAL_FAMILIES, family-inference, and the Settings UI slowdown notice Also closes #1477 and #1464 (Ornith re-enable/evaluation), both moot now that the catalog entry no longer exists. Co-Authored-By: Claude <[email protected]>
35085d0 to
ae5a084
Compare
Rebase conflict resolvedPer round 3's finding: rebased onto `origin/main` (picked up `ee3d5e06`, the unrelated same-day `#1529` CLI-capability merge). One real conflict in `ai_chat_send_to_idle_test.rs` — both branches touched the same MODEL_ID/MODEL_FILENAME/doc-comment lines. Resolved by keeping this PR's `gemma-4-e4b-q4km` values (per ADR-056) while preserving `main`'s useful historical context (the `ministral-3b-q4km` → `ministral-8b-q4km` interim-fix backstory) in the merged doc comment, rather than discarding either side's content wholesale. Verified after rebase:
Force-pushed (`--force-with-lease`) as `ae5a0841`. Commit content is unchanged from what round 3 reviewed — only SHAs changed from being replayed onto the new base. Ready for merge, pending final confirmation. |
Closes #1636