ADR-0020: Remove llmfit Dependency — Python HW Detection + llama-server -hf - #115
Merged
Conversation
…f serving Phase 1 (Add, don't break): - Add psutil dependency to pyproject.toml - Create hardware.py with tiered detection (platform + psutil + nvidia-smi/rocm-smi + torch) - Add POST /api/local-backends/llamacpp/serve-hf endpoint with SSE progress streaming - Add /api/hardware endpoint with llmfit fallback (backward compat) - Update /api/local-backends/llamacpp/status with hf_supported flag - Add serveHfFromHF() API client with SSE stream reader - Add HF serve form + guidance card in dashboard.html - Add serveHfAction() in settings.js with Python-first hardware detection - Add HF badge (🤗 HF Ready) in llama.cpp card - Full test coverage: 21 tests for hardware detection + serve-hf endpoint Part of ADR-0020: Remove llmfit Dependency
…ead code Reviewers found 2 blocking bugs + 1 cleanup: - Bug 1 (CRITICAL): Frontend hardware field paths were wrong — platform, cpu_model, gpu, ram_total_gb, etc. all read at wrong nesting or with wrong names. Entire Python hardware detection branch was dead code as a result. - Bug 2 (CRITICAL): SSE event name mismatch — backend sends 'hf_serve_complete' but frontend checked for 'install_complete'. Post-success actions never fired. - Minor: Removed dead-code 'if False' block in test_llamacpp.py
Phase 2 (Remove old code, keep new): Backend: - Removed llmfit install/uninstall endpoints from backends.py (-445 lines) - Removed /api/tools/recommendations endpoint from models.py (-78 lines) - Removed /api/local-backends/models/download and /download/progress endpoints - Updated /api/tools/status — no longer reports llmfit status - Kept llmfit fallback in /api/hardware for backward compatibility Frontend: - Removed installLlmfit, uninstallLlmfit, fetchModelRecommendations, getDownloadModelURL, getLlmfitInstallURL from api.js - Removed loadModelRecommendations(), install/uninstall/download actions from settings.js - Simplified loadHardwareInfo() to use Python detection only - Removed llmfit from backend listing in settings - Removed llmfit actions and recommendations card from dashboard.html Tests: - Removed llmfit endpoint tests from test_local_backends.py and test_web.py - Replaced llmfit cache paths with generic gguf paths in test_llamacpp.py Net: +32 lines, -1075 lines across 8 files
…gn doc - ADR-0020: Proposed → Accepted (v1.1→v1.2) - ADR-0005: Added Superseded by ADR-0020 deprecation note - ADR-0018: Resolved -hf deferred decision to Accepted per ADR-0020 - VERSION: 1.6.0 → 1.7.0 - CHANGES.md: Added v1.7.0 section - Design doc: v1.8→v1.9, ADR index updated - ADR README index: ADR-0020 status updated
…es 1-4) - #116: Empty/incomplete session dirs auto-cleaned on clear_completed() - Added deepresearch cleanup output [--dry-run] CLI command - 17 new tests for output cleanup logic (685 total) - ADR-0019 Phases 1-4: Alpine.js reactive DOM, Alpine.store() state, SSE-to-Alpine bridge, removed ~250 LOC of manual DOM manipulation - Bugs #103 (model lists refresh), #104 (transparent picker), #110 (API cleanup) - VERSION 1.9.0, CHANGES.md updated
…olish Closes #52 (Q&A interaction graph) — the last v0.15.0 blocker Closes #105 (Epic v0.15.0) — all groups complete Closes #106 (Lifecycle controls moved to Local Backends tab) Closes #107 (Streamlined Serve & Connect UX) Phase A: Scribe model prefix fix (full model ID preserved) Phase B: ADR-0018 Phases 2-3 — llama.cpp frontend integration - Lifecycle controls in Local Backends tab - Serve & Connect auto-refresh model dropdown - LiteLLM integration for model visibility Phase C: 24 new pipeline tests (CLI + Dashboard + Error handling) Phase E: CI polish — ESLint, coverage badges, Docker verify 685 + 24 + 4 = 709 tests passing
- 37 provider tests: OpenRouter, OpenAI, OpenCode Go/Zen routing - deepresearch run --benchmark flag for performance timing - scripts/benchmark-pipeline.sh for automated benchmarks - Log file monitoring and memory isolation tests - Closes #52 (Q&A graph), #106 (lifecycle controls), #107 (serve UX) - 709 + 37 = 746 total tests passing
… work Fixes documentation gaps found in final audit: - TODO.md: 9 unchecked items now marked done - README badge: 486 -> 746 tests - Design doc v2.1 with full changelog for v1.9.0 release - ADR-0018 v1.4 with Phases 2-3 frontend completion - ADR-0020 Phase 2 already reflected as complete (verified)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADR-0020: Remove llmfit Dependency
Replaces the
llmfitRust binary (~5.8 MB) with three independent, simpler solutions:Phase 1 — Add (New Functionality Alongside Old)
hardware.py) — tiered detection via psutil, nvidia-smi, rocm-smi, torchllama-server -hfServing —POST /api/local-backends/llamacpp/serve-hfwith SSE progress streamingPhase 2 — Remove (Old llmfit Code)
backends.py)/api/tools/recommendationsendpoint (-78 lines frommodels.py)llmfit downloadendpoint (-269 lines)Documentation
-hfdecision to AcceptedStats
Closes issues #101, #102, #110 (llmfit bugs addressed by replacement)