LocalAI v4.3.0 adds keyless cosign backend verification, prompt cache on by default, per-API-key usage tracking, and distributed mode v3.
$ git clone --branch v4.3.0 https://github.com/mudler/LocalAI.git # already have the repo? check out this version: $ git checkout v4.3.0
verification: issuer_regex: "^https://token\.actions\.githubusercontent\.com$" identity_regex: "^https://github\.com/mudler/LocalAI/\.github/workflows/backend_merge\.yml@.*$" not_before: "2026-05-22T00:00:00Z"
$ curl -s -H 'Authorization: Bearer <admin-token>' 'http://localhost:8080/api/auth/admin/usage/sources?user_id=<uid>&api_key_id=<kid>'
- ›Adds
--require-backend-integrityflag (orLOCALAI_REQUIRE_BACKEND_INTEGRITY=true) to enforce strict mode: missingverification:policy or empty SHA256 in gallery YAML becomes a hard-fail instead of a warning. - ›Adds
verification:block to gallery YAML supportingissuer_regex,identity_regex, andnot_beforefields for keyless cosign/sigstore-go signature verification of backend OCI images with digest pinning and TUF root caching. - ›Adds
LOCALAI_TRACING_MAX_BODY_BYTESenvironment variable (default 64 KiB) to cap captured request/response body size in trace middleware, recordingbody_truncatedand originalbody_bytesfields when truncation occurs. - ›Adds
LOCALAI_NATS_BACKEND_INSTALL_TIMEOUTandLOCALAI_NATS_BACKEND_UPGRADE_TIMEOUTenvironment variables (default 15 minutes, previously hardcoded 3 minutes) to control distributed backend install timeouts. - ›Adds new API endpoints
GET /api/auth/usage/sources(self) andGET /api/auth/admin/usage/sources(admin, withuser_id/api_key_idfilters and 200-key truncation) for per-API-key and per-user token attribution.
+9 moreshow less
- ›Changes
kv_unifieddefault totrueingrpc-server.cppandprompt_cache_alldefault totrueat the YAML layer, enablingllama-cppserver-side prompt cache out of the box — collapsing repeated system-prompt prefill from minutes to seconds. - ›Adds
cache_idle_slotsandcheckpoint_every_ntas new model-config option keys for tuningllama-cppKV cache behavior. - ›Changes
POST /api/nodes/:id/backends/installto return HTTP 202 plus ajobIDimmediately instead of blocking up to 3 minutes, with per-node scoped opcache and async streaming progress events onnodes.<nodeID>.backend.install.<opID>.progressNATS subjects. - ›Adds unified
/app/backend-logs/:modelIdroute that is mode-aware: routes to local WebSocket view in standalone mode, or to a per-node picker in distributed mode, with?from=deep-link timestamp support. - ›Adds a Sources tab to the React Usage page with a source-mix ribbon, top-7 + Other time chart, and searchable/sortable table; admin view rolls up (source, user_id, user_name) and shows owning account per named key.
- ›Adds
usage_recordsfields Source (apikey/web/legacy),APIKeyID, andAPIKeyNamewith idempotent backfill of pre-feature rows onInitDB; revoked keys remain visible in history as (revoked). - ›Adds
flake.nixandflake.lockfor a reproducible, dockerless LocalAI setup on NixOS plus a dev shell. - ›Adds a distributed test harness under
tests/distributed/for regression testing of multi-node routing behavior. - ›Implements per-request replica routing in
SmartRouter.RouteusingPickBestReplicawithin_flight ASC, last_used ASC, available_vram DESCordering, and memoizesprobeHealthper (nodeID, addr) with a 30-second TTL and singleflight coalescing.