Latest in AI
LocalAI 5.1.0 Upgrade: Fix Legacy P2P Startup Errors and the Config API 410
Check old shared tokens, upgrade workers with frontends, and move gallery config changes off the removed endpoint.
LocalAI 5.1.0 shipped on November 29. If a server won't start after the upgrade, look for the old peer-to-peer settings. If it starts but a model-admin script now gets 410 Gone, that's a different change: the old gallery config write endpoint has been retired.
Both failures are intentional. Restarting the service or retrying an HTTP request won't fix either one. Before replacing the binary on a working server, check which of these paths your setup actually uses.
LocalAI exits after the upgrade: find the old setting
The migration guide pinned to the release says that the new server exits with status 1 if it detects a legacy P2P option. It checks command-line arguments, environment variables and stored runtime settings. This matters if you removed the flag from a compose file but the same setting is still present in an environment file or in persistent state.
Look for --p2p, the old shared token, a legacy network ID and any configuration for the previous federated mode. Start with the option named in the startup log rather than clearing the entire configuration. Keep secrets out of logs or screenshots you share with a teammate.
Replace the network token with individual invitations
On the upgraded system, choose the documented P2P mode for each machine. A server that accepts connections uses share, which requires authentication. An instance that just calls other servers can use connect. Pair each machine with a one-time invitation of the right kind, such as a worker or a remote. The guide advises retaining the server's identity file so a restart doesn't look like a different peer to machines that already paired.
For distributed installs, upgrade frontends and workers together. The release notes say mixed versions can't run the new backend upgrade protocol, and the shared registration token no longer authorises worker heartbeats. I'd test one frontend and one worker on a separate environment first. After they pair, restart the worker and send a short test request through the frontend. Seeing a worker listed and seeing it actually serve a request are different checks.
Why the model config endpoint returns 410
In 5.1.0, POST /api/models/config/{id} no longer writes a model config. The maintainers document the replacement: for an installed gallery model, use the staged model-upgrade operation at POST /api/models/upgrade/{name} with config_only set to true. An edited key can require an explicit choice between your value and the gallery's.
Search deployment scripts and admin clients for the old path, then try the replacement on one disposable gallery model. Verify the job completes, reload the model, and check that your local setting still has the expected value. Don't treat acceptance of an update request as proof the model came back successfully. Keep a rollback copy of the known-good configuration before testing.
You can measure the new llama.cpp scheduling after these checks. The release changes the cache policy when more than one slot is available. Avoid changing slot counts in the same run that migrates the cluster. If the service then slows down or rejects a request, you'll know whether to investigate worker registration, model reload, or concurrency first.
I'm Paras. I write about AI and engineering from the developer's side.
I help teams turn release notes and breaking changes into guides people can follow.