Files
LocalAI/pkg
Ettore Di Giacinto 1af79c1b0f feat(model): add LookupNodeID for pure-store node ID reads
Adds ModelLoader.LookupNodeID, a hot-path-safe helper that returns the
distributed worker node ID stamped on a loaded model without touching
ml.mu or issuing a gRPC HealthCheck. Backed by a new storeMu RWMutex
that guards only the store reference, so the read never blocks behind a
HealthCheck-holding CheckIsLoaded.

Needed by the X-LocalAI-Node response-header middleware, which runs on
the response goroutine right before the first byte hits the client and
must never pay I/O for the lookup. The header value is best-effort
observability and stale reads are acceptable.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: Claude:claude-opus-4-7[1m]
2026-05-24 21:39:44 +00:00
..
2026-03-30 00:47:27 +02:00
2026-03-30 00:47:27 +02:00
2024-06-23 08:24:36 +00:00
2025-11-13 18:41:47 +01:00
2024-06-23 08:24:36 +00:00