vMLX v1.3.31
4-agent audit 2026-04-07 — Phase 5 polish (22 fixes)
Cross-agent audit delivering cross-session cache sharing, Aho-Corasick stop matching, SSM companion cache extraction, Gemma 4 native shim, and the mlx-lm 0.31.2 bump.
263/263 cache tests PASS — 27/27 live cells across Qwen3 / Gemma 4 / Nemotron Cascade 2 / Mistral 4.
Agent 1 — Cache (Coordinator)
- LRU+Trie cross-session prefix sharing on MemoryAwarePrefixCache (production default) — system → user → assistant priority eviction
cache_typeLRU + per-type bucket eviction on BlockAwarePrefixCache (paged / hybrid auto-switch)- Byte-budget eviction +
--prefix-cache-max-bytesCLI flag compute_model_cache_key()content-derived cache identity (survives JIT reload, prevents cross-config pollution)- Disk SQLite:
cache_typecolumn + priority eviction + last-fetch type round-trip in L1 backfill - Scheduler dispatcher now fires segment boundaries on memory-aware + paged (not just legacy)
- SSM companion cache stats surfaced to CachePanel UI (nbytes_mb)
Agent 2 — State Machine / API Gateway / Reasoning / Tool Parsers
state_machine.py— vendored Aho-CorasickSequenceStateMachinefrom mlx-lm 0.31.2engine/batched.pyF11 —_compute_segment_boundarieshelper + 2 wire sitesengine/simple.py— non-streamingprompt_tokensfallback + strip reserved keys fromchat_template_kwargsmllm_batch_generator.py— narrow_ssm_state_cache.clear()blast radiusscheduler.deep_reset— wiresreset_factory_cache()on shutdownserver.py— publicsize/max_entrieson/v1/cachestats
Agent 3 — SSM / Hybrid / Batched Mamba
BatchMambaCache.lengths/advance/prepare/finalizebackport from mlx-lm 0.31.2SSMCompanionCacheextracted tovmlx_engine/utils/ssm_companion_cache.pywithis_completeper-entry flagmodel_keymixed into SHA-256 (defends against cross-config pollution)is_hybrid_ssm_cache/model/configpolymorphic helpersmamba_cache.advance()in-place-=(~40 alloc/step saved on Nemotron Cascade)BatchGeneratorempty-cache crash fix (ISSUE-A3-003)- +16 new tests in
test_ssm_companion_cache.py(37 total)
Agent 4 — Loaders / JANG / Smelt / Tokenizers
is_mla_modelcentralized helper (walks top → text_config → language_config → llm_config)- Gemma 4 native text MoE local-port shim (forward-compat defers to upstream)
utils/tokenizer.py—trust_remote_code=Truedefault (silences HF warning, unblocks custom tokenizers)api/utils.py—is_mllm_model()result cache (kills INFO log spam)utils/smelt_loader.py— defensive safetensors offset-vs-EOF guardutils/jang_loader.py— §6.3 VLM remap + §6.4 Gemma 4 PLE guardsjang_toolsbundling fix (ISSUE-A4-001)ImportErrorchaining inmodels/llm.py(ISSUE-A4-003)
Core
- R-001: mlx-lm 0.30.2 → 0.31.2 bump (quad-verified across 4 sync surfaces)
- Removed orphan disk-streaming artifacts (
ssd_generate,streaming_wrapper,weight_index) superseded by memory_cache + disk_cache architecture