Peridot v1.5.1
Peridot - Changelog
Engineered by uncoalesced
Peridot v1.5.1 is the biggest update yet! A major step forward in Peridot’s security posture, hardware adaptability and long term usability. This release hardens the local perimeter (removing high risk deserialization and injection paths), introduces intelligent VRAM aware auto-scaling for smoother performance across GPUs, and delivers persistent multi-session conversational memory so Peridot can support real workflows without losing context between runs. Really delighted with how this update has come together and the stability achieved across this version.
[v1.5.1-STABLE] - 2026-06-08
Name: Peridot v1.5.1 STABLE - Security Hardening, Hardware Auto-Scaling & Multi-Session Memory
Security & Compliance (Phase 1: Critical Hotfixes)
- API Key Rotation: Eliminated hardcoded default key (
08101954).config.pynow generates a cryptographically securesecrets.token_hex(32)on first boot and persists to.envviapython-dotenv. Each deployment receives a unique 256-bit key. - Pickle RCE Remediation:
core_system/memory/vault.py- Replacedpickle.load()/dump()withjson.load()/dump()for metadata serialization (.metafile). Removes arbitrary code execution vector via malicious serialized metadata. - Shell Injection Hardening:
ui.py- Removedshell=Truefrom allsubprocess.check_output()calls tonvidia-smi. Arguments now passed as safe arrays (creationflags=0x08000000preserved for window suppression). - CORS Restriction:
server.py- RestrictedCORS(app)to exclusively allowhttp://127.0.0.1:5000andhttp://localhost:5000. Blocks cross-origin requests from external origins. - Multi-Session Conversational Memory: New
core_system/chat_ledger.py- SQLite-backed chat ledger with session CRUD, message logging, and sliding-window history retrieval (get_history(session_id, limit=6)). Integrated into/askroute: accepts optionalsession_id, auto-creates titled sessions, persists user/assistant turns, injects last 6 turns into prompt context, returnssession_idfor client continuity.
Hardware Auto-Scaling (Phase 2: VRAM Detection)
- Dynamic VRAM Detection:
config.py- Added_detect_total_vram_mb()usingnvidia-smi --query-gpu=memory.total(safe subprocess, no shell). Detects total GPU VRAM at module load. - Auto GPU_LAYERS Calculation: If model size < 75% of total VRAM ->
GPU_LAYERS=99(full offload). Else ->GPU_LAYERS=20(partial). CPU-only fallback:GPU_LAYERS=0. - Auto CONTEXT_LENGTH Calculation: >10GB VRAM -> 8192 tokens. <=10GB VRAM -> 4096 tokens. CPU-only -> 2048 tokens.
- UI Integration:
ui.pynow importsTOTAL_VRAM_GBfromconfiginstead of hardcoded8.0or duplicatenvidia-smicall. Model compatibility ratings in dropdown use dynamic VRAM envelope.
RAG Ingestion Overhaul (Phase 3: PyMuPDF & Metadata Tagging)
- Layout-Preserving PDF Extraction:
core_system/memory/vault.py- Replacedfitz.get_text("text")withfitz.get_text("text", sort=True)to preserve visual layout geometry of multi-column tables (e.g., Balance Sheets). - Provenance Tagging:
core_system/memory/vault.pyEvery text chunk now strictly prepends[SOURCE DOC: {filename}]before embedding, enabling the LLM to cite exact documentary sources during generation.