Repository navigation
This major release reworks model handling, renames the CLI to modelctl, and moves its source from canonical/inference-snaps-cli into this repository under modelctl/. Some v1 interfaces were removed or changed. Read the breaking changes before upgrading.
⚠️ Breaking changes
These changes affect anyone upgrading from v1.0.0.
User-facing
statusreports entrypoints instead of endpoints. Theendpointsmap of URL strings was replaced byentrypoints, which supports more protocols (canonical/inference-snaps-cli#412).- Environment variable overrides use the
env.prefix. Thepassthrough.environment.prefix is no longer recognized and existing values are not migrated. Keys must now start with a lowercase letter and contain only lowercase letters, digits, and single hyphens. Dots are not allowed (canonical/inference-snaps-cli#361, canonical/inference-snaps-cli#388, canonical/inference-snaps-cli#392, canonical/inference-snaps-cli#459).
Developer-facing
These changes affect people who build inference snaps or use the modelctl Go module.
- The CLI is now
modelctl. The binary is nowmodelctlinstead ofcli, and the release artifacts are nowmodelctl-linux-<arch>.tar.xzinstead ofinference-snaps-cli-linux-<arch>.tar.xz(canonical/inference-snaps-cli#380). - The Go module path changed from
github.com/canonical/inference-snaps-clitogithub.com/canonical/inference-snaps/modelctl/v2(canonical/inference-snaps-cli#379, #401). component.yamlwas replaced byruntime.yamlandmodel.yaml. Each component used to have its owncomponent.yamlunder$SNAP_COMPONENTS. That file is no longer read. Engine settings are now split into two kinds of manifest inside the snap (canonical/inference-snaps-cli#362):- Runtime manifests at
$SNAP/runtimes/<runtime>/runtime.yamldefine the servers, environment, layout, and components of an inference runtime. - Model manifests at
$SNAP/models/<model>/model.yamldefine a model's metadata, capabilities, disk and memory requirements, environment, layout, and components.
- Runtime manifests at
- The engine manifest schema changed (canonical/inference-snaps-cli#362, canonical/inference-snaps-cli#364, canonical/inference-snaps-cli#365):
- Removed
components,memory, anddisk-space. Components and resource requirements now come from the referenced runtime and models. - Added
runtime, which references a runtime manifest, andmodel, which sets adefaultmodel and the modeloptions. - Replaced
gradewith an optionalexperimentalboolean. - Added a required
summaryfield of up to 56 characters.
- Removed
- Removed the deprecated
run --wait-for-componentsflag.runalready waited for components in v1 (canonical/inference-snaps-cli#458). - Removed the
serve-webui --capabilitiesflag. The web UI now reads capabilities from the active model's metadata (canonical/inference-snaps-cli#395).
Added
Model management
- Engines can offer several models. Each model is described by a
model.yamlmanifest and identified by name (canonical/inference-snaps-cli#362, canonical/inference-snaps-cli#395, canonical/inference-snaps-cli#404). - Added
models,model [<model>], anduse-modelto list, inspect, and select models (canonical/inference-snaps-cli#362, canonical/inference-snaps-cli#376, canonical/inference-snaps-cli#428). - Added
models --all(canonical/inference-snaps-cli#425). - Added model capabilities for
text-embedding, audio transcription, anddecision(canonical/inference-snaps-cli#414, canonical/inference-snaps-cli#421, canonical/inference-snaps-cli#460). - Added model format metadata (canonical/inference-snaps-cli#435).
- Model names are now read from the manifest (canonical/inference-snaps-cli#429).
- Model aliases must be unique within each engine (canonical/inference-snaps-cli#419).
- Models can be selected by available disk space and memory (canonical/inference-snaps-cli#449, canonical/inference-snaps-cli#475).
Engine selection and hardware detection
- Hardware is now detected with
lscompute(canonical/inference-snaps-cli#390, canonical/inference-snaps-cli#454). - Added compute capability matching (canonical/inference-snaps-cli#427).
- Added a selector for Qualcomm FastRPC NPUs, and signal processing controllers now match the
nputype (canonical/inference-snaps-cli#335, canonical/inference-snaps-cli#470). - A fallback engine can be set when auto-selecting or fixing an engine (canonical/inference-snaps-cli#369).
- Installing the snap with components now overrides engine selection (canonical/inference-snaps-cli#385).
switchEngineaccepts a model override (canonical/inference-snaps-cli#387).- Memory and disk size values in manifests can be decimal numbers, for example
1.5G(canonical/inference-snaps-cli#431).
Commands
- Added shorter command names:
engines,engine, andmachine. The v1 commandslist-engines,show-engine, andshow-machinestill work but are deprecated (canonical/inference-snaps-cli#428). - Added a
lint-packagedebug command that validates manifests, plus a GitHub Action for package linting (canonical/inference-snaps-cli#394, canonical/inference-snaps-cli#409). - Added
run --share-provider <dir>. It writes provider details, including server URLs and Unix sockets, toprovider.envin a shared directory. Unix socket paths are derived from the runtime manifest and that directory (canonical/inference-snaps-cli#432, canonical/inference-snaps-cli#448, canonical/inference-snaps-cli#450, canonical/inference-snaps-cli#451). - Added a hidden
diagnosecommand.diagnose --serve-fallback=openaiserves an OpenAI-compatible error response when the engine cannot start (canonical/inference-snaps-cli#455, #428).
Changed
- Engine scores are printed only with
--verbose(canonical/inference-snaps-cli#474). - Server readiness is checked by sending a user message (canonical/inference-snaps-cli#393).
lscpuis used to detect when the snap runs without confinement (canonical/inference-snaps-cli#400).- The
chatmessage shown while waiting for the model is clearer (#421). - The
modelctlversion is now set at build time through an ldflag (#404).
Fixed
- Fixed the minimum column width in table output (canonical/inference-snaps-cli#367).
- The status report no longer assumes the host is localhost. Unspecified hosts and
127.0.0.1are reported aslocalhost(canonical/inference-snaps-cli#366, canonical/inference-snaps-cli#468). chathandles an empty response stream (#426).use-enginereturns correct exit codes (#429).
Project and tooling
- The CLI repository was merged into
canonical/inference-snapsand restructured undermodelctl/(#401). - Several snap-related operations moved into the
snappackage (canonical/inference-snaps-cli#405). - Moved from
stack-utilsto themodelctl-testsnap, and added test configuration fixes and smoke testing (canonical/inference-snaps-cli#472, canonical/inference-snaps-cli#438, canonical/inference-snaps-cli#453). - Snap store tests use
httptestinstead ofapi.snapcraft.io(#427). - The build recipes were refactored (#413).
- CI now runs a Go linter and validates semantic PR titles (#431, #408, #403).
- Renovate uses the shared config, tracks git submodules, and auto-merges dev submodule updates (canonical/inference-snaps-cli#402, canonical/inference-snaps-cli#374, canonical/inference-snaps-cli#391).
- Dependency updates, including
go.yaml.in/yaml/v4v4.0.0 andopenai-go/v3(#405).
Full changelog: canonical/inference-snaps-cli v1.0.0...main, up to the repository merge, followed by the modelctl/ history in this repository.