Files
LocalAI/pkg/mcp/localaitools/prompts/20_tools.md
Richard Palethorpe eb32cd9073 feat(realtime): eager blocking pipeline warm-up + /backend/load API (#10662)
Realtime sessions previously lazy-loaded each pipeline sub-model (VAD,
transcription, LLM, TTS) on first use, so every cold session paid a
per-request model-load stall and load errors only surfaced mid-stream.

Warm the whole pipeline eagerly and blockingly at session start
(including the voice-gate speaker-recognition model, which an enforced
gate blocks each utterance on; compaction's summary_model stays lazy
since it only runs off the response path):
- Add backend.PreloadModel / PreloadModelByName as the single load path
  for every modality (no transcription special-case; backend-omitted
  configs are deprecated).
- The realtime session blocks on Model.Warmup and returns a
  model_load_error to the client if any stage fails to load;
  updateSession warms in the background. Opt out per pipeline with
  pipeline.disable_warmup, exposed as a UI toggle via the
  config-metadata registry.

Add a LocalAI-native POST /backend/load (and /v1/backend/load) that
pre-loads a model -- expanding realtime pipelines into their sub-models
-- as the inverse of /backend/shutdown. There is one preload engine
(backend.PreloadStages): the realtime Warmup methods, /backend/load and
the --load-to-memory startup flag all use it, so --load-to-memory now
also expands pipeline models and records load-failure traces. Pipeline
sub-model alias resolution is likewise shared
(ModelConfigLoader.LoadResolvedModelConfig). Surface the endpoint
everywhere an admin manages models:
- MCP admin tool load_model (httpapi + inproc clients, safety/catalog
  prompts, catalog/dispatch tests).
- "Load into memory" action in the React models UI.
- Swagger regenerated; docs moved to the general backend-monitor page
  since it is not realtime-specific.

Fix a Traces UI crash ("json: unsupported value: -Inf"): audio-snippet
RMS/peak now floor at a finite dBFS, and backend-trace data is sanitized
to drop non-finite floats before marshaling. The sanitizer is
copy-on-write -- it runs on every RecordBackendTrace, so containers are
only re-allocated on the paths that actually changed.

Migrate core/http/openresponses_test.go onto the prebuilt mock-backend
the rest of the http suite already uses -- it was the last spec still
pointing at a real HuggingFace model, so it 404'd wherever no vision
backend was built -- and fix its item_reference specs to send the
spec's "id" field instead of "item_id", which the handler never
accepted.

Assisted-by: Claude:claude-opus-4-8 Claude Code

Signed-off-by: Richard Palethorpe <io@richiejp.com>
2026-07-03 18:00:37 +02:00

2.0 KiB

Tool catalog

The MCP tools/list endpoint also exposes the full input schema for each of these. The list below is the canonical curated description.

Read-only

  • gallery_search — Search configured galleries for installable models.
  • list_installed_models — List models currently installed on this LocalAI. Optional capability filter (e.g. chat, embed, image).
  • list_galleries — List configured model galleries.
  • list_backends — List installed backends.
  • list_known_backends — List backends available to install from configured backend galleries.
  • get_job_status — Poll the status of an install/delete/upgrade job by id.
  • get_model_config — Read the YAML/JSON config of an installed model.
  • vram_estimate — Estimate VRAM use for a model under a given config.
  • system_info — LocalAI version, paths, distributed flag, loaded models, installed backends.
  • list_nodes — List federated worker nodes (only useful in distributed mode).

Mutating (require user confirmation per safety rule 1)

  • install_model — Install a model from a gallery. Returns a job id; poll with get_job_status.
  • import_model_uri — Install a model from an arbitrary URI (HuggingFace, OCI, http(s), file://). May return ambiguous_backend when several backends apply; call again with backend_preference to disambiguate.
  • delete_model — Delete an installed model.
  • install_backend — Install a backend.
  • upgrade_backend — Upgrade an installed backend by name.
  • edit_model_config — Patch (deep-merge) JSON into an installed model's config.
  • reload_models — Reload all model configs from disk.
  • load_model — Pre-load a model into memory so the first request pays no cold-start cost. For a realtime pipeline model, every sub-model (VAD, transcription, LLM, TTS, sound_detection, voice_recognition) is loaded. Inverse of stopping a model.
  • toggle_model_state — Enable or disable a model (action: enable or disable).
  • toggle_model_pinned — Pin or unpin a model (action: pin or unpin).