feat(goal): /config skeptic-local — auto-managed local model for the skeptic#111
Merged
Conversation
…skeptic Turn the /goal skeptic review over to a small local model with one command, building on the opt-in skeptic_endpoint from #110. `/config skeptic-local on` now does the whole setup automatically: - detect the machine's local-inference backend (Apple-Silicon MLX or NVIDIA CUDA); no backend → clear message, skeptic stays on the main model - resolve a small default review model (~3B, 4-bit), overridable via HI_SKEPTIC_LOCAL_REPO / _MODEL_ID / _GGUF - download it if it isn't cached, reusing the same .hi/models layout as `/hf run --mlx` so a model fetched either way is shared - launch `hi-local serve` and wait for /health, then point skeptic_endpoint/skeptic_model at it and rebuild the skeptic provider - `/config skeptic-local off` stops the server and restores prior settings Every step degrades gracefully: a missing backend, missing binary, failed download, or unhealthy server returns an error and leaves the skeptic on the main provider — config is only mutated after the server is healthy. The server is torn down on session exit (CLI via kill_background_processes, TUI via a drop guard). The blocking, progress-to-terminal download runs only on the plain CLI; the TUI reports NeedsDownload rather than corrupting its alternate screen. New: hi-tools `local_server` (spawn + health, private registry) and hi-agent `local_skeptic` (backend/model policy + Agent enable/disable). Deterministic core is unit-tested; the live download+spawn is hardware-validated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
davidrhodus
force-pushed
the
goal-local-skeptic-auto
branch
from
July 17, 2026 03:59
289d6be to
d85f709
Compare
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.
Stacked on #110 (opt-in
skeptic_endpoint). Makes the local/goalskeptic fully automated behind one toggle:/config skeptic-local on.What it does
/config skeptic-local onruns the whole setup, each step failing soft:nvidia-smiprobe). No backend → message, skeptic stays on the main model.HI_SKEPTIC_LOCAL_REPO/HI_SKEPTIC_LOCAL_MODEL_ID/HI_SKEPTIC_LOCAL_GGUF..hi/modelscache layout as/hf run --mlx, so a model fetched either way is shared.hi-local serveand waits for/health(verbatim of the proven/hfpath).skeptic_endpoint/skeptic_modeland rebuilds the skeptic provider. The driver and planner stay on the main model./config skeptic-local offstops the server and restores the prior skeptic settings.Safety / graceful degradation
hi-local, download fail, unhealthy server) returns an error and leaves the skeptic on the main provider. No hangs, no half-wired state.kill_background_processes, TUI via a drop guard covering every exit path (private registry,stop_all_local_servers).NeedsDownloadinstead of corrupting its alternate screen.Structure
hi-tools/local_server.rs(new) — process/HTTP mechanics: spawn into a private background registry,/healthwait, stop-by-id / stop-all,skeptic_model_dircache path.hi-agent/local_skeptic.rs(new) — policy + orchestration: backend detection, default-model registry, presence checks,servearg builder, andAgent::enable_local_skeptic/disable_local_skeptic./config skeptic-local <on|off>parsing (ConfigArg::SkepticLocal) wired into both frontends; the CLI routes it through an async arm (it may download/spawn).Tests
cargo test -p hi-agent -p hi-toolsgreen (564 + 229).-D warnings) / file-size ratchet all pass.🤖 Generated with Claude Code