local config support on top of #185 - #186
Conversation
30e3ea4 to
b9d5913
Compare
There was a problem hiding this comment.
Pull request overview
Adds phase-2 local node startup configuration so mesh-llm serve can load startup models (and their per-model settings) from the unified local config file, and updates service installers/docs to rely on that config instead of custom service argv.
Changes:
- Load and resolve startup models from
~/.mesh-llm/config.toml(with CLI models/context size overriding config). - Extend unified config parsing/validation to include
version,[gpu], and[[models]]entries alongside existing[[plugin]]. - Update install/service templates and documentation so background services run
mesh-llm servedirectly and don’t restart-loop on clean exit.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents startup config, precedence rules, and service behavior changes. |
| mesh-llm/src/runtime/mod.rs | Implements startup-model planning/resolution from config + CLI precedence and “no models” clean-exit path. |
| mesh-llm/src/runtime/local.rs | Adds optional mmproj override support when starting local llama-server. |
| mesh-llm/src/runtime/discovery.rs | Adjusts “start new mesh” behavior to respect presence of configured startup models. |
| mesh-llm/src/plugin/mod.rs | Re-exports new config types (MeshConfig/ModelConfigEntry) for use in runtime. |
| mesh-llm/src/plugin/config.rs | Adds unified config schema for version/gpu/models and validates unsupported settings. |
| mesh-llm/src/cli/mod.rs | Makes --config user-visible and updates CLI help text to mention config-backed serve. |
| mesh-llm/README.md | Updates developer docs to describe unified local config (models + plugins). |
| mesh-llm/docs/TESTING.md | Adds a startup-config smoke checklist for manual testing. |
| mesh-llm/docs/DESIGN.md | Documents local-node config scope and CLI precedence rules. |
| install.sh | Switches services to run mesh-llm serve, removes service-args workflow, and updates messaging. |
| docs/USAGE.md | Documents config-backed serve and updated service install behavior. |
| dist/mesh-llm.service | Changes restart policy to on-failure to avoid restart loops on clean exit. |
| dist/com.mesh-llm.mesh-llm.plist | Restarts launchd job only on unsuccessful exit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| CLI precedence is by concern: | ||
|
|
||
| - explicit `--model` or `--gguf` ignores configured `[[models]]` | ||
| - explicit `--context-size` overrides configured `ctx_size` |
There was a problem hiding this comment.
Design doc references --context-size, but the CLI flag is --ctx-size and there is no --context-size alias. Align the docs with the current CLI surface, or add an alias so the documented command works.
| - explicit `--context-size` overrides configured `ctx_size` | |
| - explicit `--ctx-size` overrides configured `ctx_size` |
b9d5913 to
16b916b
Compare
|
@copilot apply changes based on the comments in this thread |
…ze docs, remove dead service-args code Agent-Logs-Url: https://github.com/michaelneale/mesh-llm/sessions/2edc2366-a8ef-4876-b950-5c4074df8a67 Co-authored-by: i386 <50156+i386@users.noreply.github.com>
Applied all changes from the review thread in 100a649:
|
Refs #184.
Depends on #185.
Users can now put startup models in
~/.mesh-llm/config.tomland runmesh-llm servewithout repeating model flags in every launch path.What changed
mesh-llm servenow loads startup models from~/.mesh-llm/config.toml[[models]]and[[plugin]]ctx_sizemmproj--model/--ggufstill win over configured[[models]]--context-sizestill wins over configured per-modelctx_sizemesh-llm servedirectly and expect startup models in configExamples
Default config path:
Start from config:
Override config explicitly:
Bare
mesh-llm servewith no configured[[models]]now warns, shows help, and exits cleanly:Services
Background service installs now use
mesh-llm serveas the service command:launchdloads~/.config/mesh-llm/service.envand executesmesh-llm servesystemd --userwritesmesh-llm serveintoExecStart=~/.mesh-llm/config.toml, notservice.argsor custom service argvThe service restart policy now matches the new clean-exit path so a missing config does not loop forever:
systemd:Restart=on-failurelaunchd: restart only on unsuccessful exitScope
Included here:
config.tomlparsing for startup models plus pluginsmesh-llm servectx_sizemmprojStill not in scope:
gpu_idassignmentValidation
cargo test -p mesh-llmbash -n install.sh