From 06506529eab28cc3cb4767464f18d7b92a557bf9 Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Fri, 31 Jul 2026 03:06:34 +0000 Subject: [PATCH] fix(cachyllama): link SSD cache implementation CachyLLaMA splits persistent prompt-cache support into separate source files. Include those implementations in the monolithic LocalAI gRPC adapter when the fork provides them so the ARM64 fallback build resolves the page-manager symbols. Assisted-by: Codex:gpt-5 [Codex] --- backend/cpp/llama-cpp/grpc-server.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/cpp/llama-cpp/grpc-server.cpp b/backend/cpp/llama-cpp/grpc-server.cpp index 67d5ef11f..c715eaad6 100644 --- a/backend/cpp/llama-cpp/grpc-server.cpp +++ b/backend/cpp/llama-cpp/grpc-server.cpp @@ -43,6 +43,15 @@ #if __has_include("server-stream.cpp") #include "server-stream.cpp" #endif +// CachyLLaMA splits its persistent prompt-cache implementation out of +// server-context.cpp. Pull both implementation files into this monolithic +// adapter TU when present; older llama.cpp pins do not ship them. +#if __has_include("server-context-ssd-cache.cpp") +#include "server-context-ssd-cache.cpp" +#endif +#if __has_include("server-context-page-manager.cpp") +#include "server-context-page-manager.cpp" +#endif #include "server-context.cpp" // LocalAI